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

    SlingHttpServletResponse responseMock = mock(SlingHttpServletResponse.class);
    PrintWriter writerMock = mock(PrintWriter.class);
    when(responseMock.getWriter()).thenReturn(writerMock);
    underTest.doGet(mock(SlingHttpServletRequest.class), responseMock);
    ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
    verify(writerMock, times(1)).write(captor.capture());
    String actualJsonContent = captor.getValue();
    assertNotNull(actualJsonContent);
    JsonArray actualJson = new Gson().fromJson(actualJsonContent, JsonArray.class);
    assertNotNull(actualJson);
    assertTrue(actualJson.size() > 5);
    assertTrue(actualJson.contains(new JsonPrimitive("aecu")));
    assertTrue(actualJson.contains(new JsonPrimitive("contentUpgradeBuilder()")));
    assertTrue(actualJson.contains(new JsonPrimitive("run()")));
}