@Test
public void writeResult_status() throws IOException {

    servlet.writeResult(response, "test", HttpServletResponse.SC_BAD_GATEWAY);
    verify(response, times(1)).setStatus(HttpServletResponse.SC_BAD_GATEWAY);
    verify(writer, times(1)).write("test");
}