@Test
public void testDoGetWhenTypeIsResponseFormatterShouldWriteResourceToResponse() throws ServletException, IOException {

    //GIVEN
    String expectedResult = "{\"files\":[\"ResponseFormatter.class\"]}";
    given(request.getParameter(TYPE_PARAMETER)).willReturn(RESPONSE_FORMATTER);
    given(stubResourcePathProvider.getResponseFormatterPath()).willReturn(path);
    given(path.toFile()).willReturn(file);
    given(fileListJsonBuilder.buildFileListJson(file)).willReturn(expectedResult);
    //WHEN
    underTest.doGet(request, response);
    //THEN
    verify(writer).write(expectedResult);
}