RoutingProcedureResponse { public Query procedure() { return procedure; } RoutingProcedureResponse(Query procedure, List<Record> records );  RoutingProcedureResponse(Query procedure, Throwable error ); private  RoutingProcedureResponse(Query procedure, List<Record> records, Throwable error ); boolean isSuccess(); Query procedure(); List<Record> records(); Throwable error();  }
@Test void shouldHaveProcedure() { RoutingProcedureResponse response = new RoutingProcedureResponse( PROCEDURE, asList( RECORD_1, RECORD_2 ) ); assertEquals( PROCEDURE, response.procedure() ); }