use of org.trellisldp.vocabulary.Trellis.PreferAccessControl in project trellis by trellis-ldp.
the class AbstractTrellisHttpResourceTest method testGetBinaryAcl.
@Test
void testGetBinaryAcl() {
when(mockBinaryResource.stream(PreferAccessControl)).thenAnswer(inv -> Stream.of(rdf.createQuad(PreferAccessControl, binaryIdentifier, ACL.mode, ACL.Read)));
try (final Response res = target(BINARY_PATH).queryParam(EXT, ACL_PARAM).request().get()) {
assertEquals(SC_OK, res.getStatus(), ERR_RESPONSE_CODE);
assertFalse(getLinks(res).stream().anyMatch(l -> l.getRel().equals(DESCRIBES)), "Unexpected rel=describes");
assertFalse(getLinks(res).stream().anyMatch(l -> l.getRel().equals(DESCRIBEDBY)), "Unexpected rel=describedby");
assertFalse(getLinks(res).stream().anyMatch(l -> l.getRel().equals("canonical")), "Unexpected rel=canonical");
assertFalse(getLinks(res).stream().anyMatch(l -> l.getRel().equals("alternate")), "Unexpected rel=alternate");
}
}
Aggregations