Responses { public static Response channelNotBound(String channelName, CloudEvent cloudEvent) { return Response. serverError(). entity(new ResponseError(String.format(ERROR_CHANNEL_NOT_BOUND, channelName, Printer.beautify(cloudEvent)))) .build(); } private  Responses(); static Response errorProcessingCloudEvent(Throwable cause); static Response channelNotBound(String channelName, CloudEvent cloudEvent);  }
@Test void channelNotBound() { final Response response = Responses.channelNotBound("MyChannel", null); assertThat(response).isNotNull(); assertThat(response.getStatus()).isEqualTo(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); assertThat(response.getEntity()).isInstanceOf(ResponseError.class); }