@Test public void testEquals() { final ContentId contentId = ContentId.from("a"); final ContentPath parentPath = ContentPath.ROOT; MoveContentParams params = new MoveContentParams(contentId, parentPath); params.creator(PrincipalKey.ofAnonymous()); assertEquals(contentId, params.getContentId()); assertEquals(parentPath, params.getParentContentPath()); assertEquals(PrincipalKey.ofAnonymous(), params.getCreator()); MoveContentParams params2 = new MoveContentParams(params.getContentId(), params.getParentContentPath()); assertEquals(params, params2); assertEquals(params.hashCode(), params2.hashCode()); }
private static Filter createNoPrincipalsFilter() { return ValueFilter.create() .fieldName(NodeIndexPath.PERMISSIONS_READ.toString()) .addValue(ValueFactory.newString(PrincipalKey.ofAnonymous().toString())) .build(); }