ValidationUtil { public static boolean group(String group) { return GROUPNAME_REGEX.isValid(group); } private  ValidationUtil(); static boolean username(String user); static boolean group(String group); static boolean password(String password); static boolean privateIP(String ip); static boolean address(String address); static boolean port(String port); static boolean port(int port); static boolean path(String path); static boolean version(String version); static boolean email(String email); static boolean ipv4(String ipv4); static final int USER_MAX; static final int USER_MIN; static final int GROUP_MAX; static final int GROUP_MIN; static final int PASSWORD_MAX; static final int PASSWORD_MIN; }
@Test void testGroup() { assertFalse(group(null)); assertFalse(group("test group**")); assertFalse(group(RandUtil.nextAlphabetic(GROUP_MAX + 1))); assertFalse(group(RandUtil.nextAlphabetic(GROUP_MIN - 1))); assertTrue(group("test group")); }