L2UpdateMessage extends FeedMessage { public String[][] getChanges() { return changes; } L2UpdateMessage();  L2UpdateMessage(String[][] changes); String[][] getChanges(); void setChanges(String[][] changes);  }
@Test void shouldDeserialiseL2UpdateMessagesSuccessfully() throws JsonProcessingException { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JavaTimeModule()); String json = "{ \"type\": \"l2update\"," + " \"product_id\": \"BTC-GBP\"," + " \"changes\": [" + " [" + " \"buy\"," + " \"5454.12\"," + " \"0.00000000\"" + " ]" + " ]," + " \"time\": \"2020-04-10T15:28:07.393966Z\"" + "}"; L2UpdateMessage result = objectMapper.readValue(json, L2UpdateMessage.class); assertEquals("l2update", result.getType()); assertEquals("BTC-GBP", result.getProduct_id()); assertEquals("buy", result.getChanges()[0][0]); assertEquals("5454.12", result.getChanges()[0][1]); assertEquals("0.00000000", result.getChanges()[0][2]); assertEquals("2020-04-10T15:28:07.393966Z", result.getTime().toString()); }