@Test
public final void testSearchPolicy() throws IOException {

    PolicyController.setjUnit(true);
    PolicyController.setPapUrl("http://localhost:8070/pap/");
    PolicyRestController controller = new PolicyRestController();
    BufferedReader reader = new BufferedReader(new StringReader("{\"foo\":\"bar\"}"));
    Mockito.when(request.getReader()).thenReturn(reader);
    Mockito.when(request.getRequestURI()).thenReturn("/pap/foo/");
    assertThatExceptionOfType(NullPointerException.class)
            .isThrownBy(() -> controller.searchPolicy(request, response));
}