@Test
public void getPoliciesErrorTest() {

    // Setup:
    doThrow(new IllegalStateException()).when(policyManager).getPolicies(any(PolicyQueryParams.class));
    Response response = target().path("policies").request().get();
    assertEquals(response.getStatus(), 500);
    verify(policyManager).getPolicies(any(PolicyQueryParams.class));
}