I'm running through the second breaking the monolith section and I'm finding the wording confusing.
At the end of step 8, you add the following hoverfly rule:
@ClassRule
public static HoverflyRule hoverflyRule = HoverflyRule.inSimulationMode(dsl(
service("inventory:8080")
// .andDelay(2500, TimeUnit.MILLISECONDS).forMethod("GET")
.get(startsWith("/services/inventory"))
// .willReturn(serverError())
.willReturn(success("[{\"itemId\":\"329199\",\"quantity\":9999}]", "application/json"))
));
When you get to step 11, the original fall backrule that it shows is actually the same as what it shows as the original. Specifically, this line:
.willReturn(success(json(new Inventory("9999",9999))))
is shown instead of the line from step 8:
.willReturn(success("[{\"itemId\":\"329199\",\"quantity\":9999}]", "application/json"))
The 9999 change fails with an error about converting an ARRAY to JSON, also I assume the ID should 329199 instead, i,e.
.willReturn(success(json(new Inventory("329199",9999))))
Anyway I think the intent is for the original line to stay the same thoughout but wanted to check instead of submitting a PR directly.