@Test
public void retrieveRecordPolicyTest() {

    Response response = target().path("record-permissions/" + encode(recordIRI.stringValue())).request().get();
    assertEquals(response.getStatus(), 200);
    verify(policyManager).getPolicy(recordPolicyIRI);
    try {
        JSONObject result = JSONObject.fromObject(response.readEntity(String.class));
        assertEquals(result, JSONObject.fromObject(recordJson));
    } catch (Exception e) {
        fail("Expected no exception, but got: " + e.getMessage());
    }
}