ContinueExecution implements ServerResponseOnShouldContinue { @Override public String toMessage() { try { final List<Object> arguments = new ArrayList<>(); final Map<String, Object> value = ImmutableMap.of("continue", arguments); return mapper.writeValueAsString(value); } catch (final JsonProcessingException e) { throw new ResponseException("Unable to serialize continue response arguments to json", e); } } ContinueExecution(); @VisibleForTesting  ContinueExecution(final ObjectMapper mapper); @Override String toMessage();  }
@Test public void properMessageIsConstructed_forContinueExecutionMessage() { assertThat(new ContinueExecution().toMessage()).isEqualTo("{\"continue\":[]}"); }