@Test
public void shouldThrowResultExceptionIfAnIOExceptionWhenSendErrorWithMessage() throws Exception {

	doThrow(new IOException()).when(response).sendError(anyInt(), anyString());
	try {
		httpResult.sendError(SC_INTERNAL_SERVER_ERROR, "A simple message");
		fail("should throw ResultException");
	} catch (ResultException e) {
		verify(response, only()).sendError(anyInt(), anyString());
	}
}