assertNotNull(ctx);
OperationChain chain = new OperationChain(
"testMiniMessageOperation");
chain.add(GetMiniMessages.ID);
Blob result = (Blob) automationService.run(ctx, chain);
assertNotNull(result);
String json = result.getString();
assertNotNull(json);
ObjectMapper mapper = new ObjectMapper();
Map<String, Object> m = mapper.readValue(json,
new TypeReference<Map<String, Object>>() {
});
List<Map<String, Object>> miniMessages = (List<Map<String, Object>>) m.get("miniMessages");
assertEquals(5, miniMessages.size());
chain = new OperationChain("testMiniMessageOperation");
chain.add(GetMiniMessages.ID).set("offset", 5);
result = (Blob) automationService.run(ctx, chain);
assertNotNull(result);
json = result.getString();
assertNotNull(json);
mapper = new ObjectMapper();
m = mapper.readValue(json,
new TypeReference<Map<String, Object>>() {
});
miniMessages = (List<Map<String, Object>>) m.get("miniMessages");
assertEquals(5, miniMessages.size());
chain = new OperationChain("testMiniMessageOperation");
chain.add(GetMiniMessages.ID).set("offset", 10);
result = (Blob) automationService.run(ctx, chain);
assertNotNull(result);
json = result.getString();
assertNotNull(json);
mapper = new ObjectMapper();
m = mapper.readValue(json,
new TypeReference<Map<String, Object>>() {