@Test
public void createPolicyThatAlreadyExistsTest() {

    // Setup:
    doThrow(new IllegalArgumentException()).when(policyManager).addPolicy(policy);
    Response response = target().path("policies").request().post(Entity.json("{\"PolicyId\": \"urn:test\"}"));
    assertEquals(response.getStatus(), 400);
    verify(policyManager).createPolicy(any(PolicyType.class));
    verify(policyManager).addPolicy(any(XACMLPolicy.class));
}