@Test
public void testDoGetWhenExceptionShouldWriteErrorToResponse() throws ServletException, IOException, ClassNotFoundException {

    //GIVEN
    given(request.getContentLength()).willReturn(1);
    willThrow(new DescriptorCannotBeParsedException(EXCEPTION_MESSAGE, new Throwable())).given(routingService).performModification(
            Mockito.any(NewStubDescriptorCommand.class));
    //WHEN
    underTest.doGet(request, response);
    //THEN
    verify(writer).write(Mockito.anyString());
}