@Test
public void testGetFactAcl() throws Exception {

  UUID fact = UUID.randomUUID();
  when(getTiService().getFactAcl(any(), isA(GetFactAclRequest.class))).then(i -> {
    assertEquals(fact, i.<GetFactAclRequest>getArgument(1).getFact());
    return StreamingResultSet.<AclEntry>builder().setValues(createFactAcl()).build();
  });
  Response response = target(String.format("/v1/fact/uuid/%s/access", fact)).request().get();
  JsonNode payload = getPayload(response);
  assertEquals(200, response.getStatus());
  assertTrue(payload.isArray());
  assertEquals(3, payload.size());
  verify(getTiService(), times(1)).getFactAcl(notNull(), isA(GetFactAclRequest.class));
}