InvocationResponse { public Object[] asProtocolSpecification() { return new Object[] { getResponseName(), getResults(), getMethodCallId() }; } InvocationResponse(Method.Response.Name name, ObjectNode results, MethodCallId methodCallId); Method.Response.Name getResponseName(); ObjectNode getResults(); MethodCallId getMethodCallId(); Object[] asProtocolSpecification();  }
@Test public void asProtocolSpecificationShouldReturnAnArrayWithThreeElements() { Object[] asProtocolSpecification = new InvocationResponse(Method.Response.name("method"), new ObjectNode(new JsonNodeFactory(false)).putObject("{}"), MethodCallId.of("#1")) .asProtocolSpecification(); assertThat(asProtocolSpecification).hasSize(3); }