QueryUtil { @NotNull public static String getNodeTypeName(@NotNull AuthorizableType type) { if (type == AuthorizableType.USER) { return UserConstants.NT_REP_USER; } else if (type == AuthorizableType.GROUP) { return UserConstants.NT_REP_GROUP; } else { return UserConstants.NT_REP_AUTHORIZABLE; } } private  QueryUtil(); @NotNull static String getSearchRoot(AuthorizableType type, ConfigurationParameters config); @NotNull static String getNodeTypeName(@NotNull AuthorizableType type); @NotNull static String escapeNodeName(@NotNull String string); @NotNull static String format(@NotNull Value value); @NotNull static String escapeForQuery(@NotNull String oakName, @NotNull NamePathMapper namePathMapper); @NotNull static String escapeForQuery(@NotNull String value); @NotNull static RelationOp getCollation(@NotNull QueryBuilder.Direction direction); @Nullable static String getID(@Nullable Authorizable authorizable);  }
@Test public void testNodeTypeName() { Map<AuthorizableType, String> ntNames = ImmutableMap.of( AuthorizableType.USER, UserConstants.NT_REP_USER, AuthorizableType.GROUP, UserConstants.NT_REP_GROUP, AuthorizableType.AUTHORIZABLE, UserConstants.NT_REP_AUTHORIZABLE); for (AuthorizableType type : ntNames.keySet()) { assertEquals(ntNames.get(type), QueryUtil.getNodeTypeName(type)); } }