DittoRuntimeExceptionToHttpResponse implements Function<DittoRuntimeException, HttpResponse> { public static DittoRuntimeExceptionToHttpResponse getInstance(final HeaderTranslator headerTranslator) { return new DittoRuntimeExceptionToHttpResponse(checkNotNull(headerTranslator, "headerTranslator")); } private  DittoRuntimeExceptionToHttpResponse(final HeaderTranslator headerTranslator); static DittoRuntimeExceptionToHttpResponse getInstance(final HeaderTranslator headerTranslator); @Override HttpResponse apply(final DittoRuntimeException exception);  }
@Test public void tryToGetInstanceWithNullHeaderTranslator() { assertThatNullPointerException() .isThrownBy(() -> DittoRuntimeExceptionToHttpResponse.getInstance(null)) .withMessage("The headerTranslator must not be null!") .withNoCause(); }