UnrecognizedRequestFulfiller implements RequestFulfiller { public void fulfillRequest(RunnableFunction onRequestFulfilled) { responseWriter.writeNotFoundResponse(requestString); onRequestFulfilled.run(); } UnrecognizedRequestFulfiller(ResponseWriter responseWriter, String requestString); void fulfillRequest(RunnableFunction onRequestFulfilled);  }
@Test public void callsOnRequestFulfilled() { testSubject.fulfillRequest(onRequestFulfilledMock); }
@Test public void writesResponseMessage() { testSubject.fulfillRequest(onRequestFulfilledMock); verify(responseWriter).writeNotFoundResponse(requestString); }