FileNameProvider { public String getFileName(final WilmaHttpRequest request) { String wilmaMessageLoggerId = request.getWilmaMessageLoggerId(); String path = getPath(); return path + "/" + wilmaMessageLoggerId + NAME_ENDING; }  String getFileName(final WilmaHttpRequest request); String getFileName(final WilmaHttpResponse response);  }
@Test public void testGetFileNameShouldReturnRequestFileName() { given(request.getWilmaMessageLoggerId()).willReturn(WILMA_MESSAGE_LOGGER_ID + "req"); String actual = underTest.getFileName(request); assertEquals(actual, "path/" + WILMA_MESSAGE_LOGGER_ID + "req.txt"); }
@Test public void testGetFileNameShouldReturnResponseFileName() { given(response.getWilmaMessageLoggerId()).willReturn(WILMA_MESSAGE_LOGGER_ID + "resp"); String actual = underTest.getFileName(response); assertEquals(actual, "path/" + WILMA_MESSAGE_LOGGER_ID + "resp.txt"); }