### Question:
RepositoryFeatures { protected boolean isValidEndpointPath(String endpointName) { char[] charArray = endpointName.toCharArray(); for (int i = 0; i < charArray.length; i++) { char c = charArray[i]; if (i == 0) { if (c != '/') { return false; } continue; } if (!(Character.isAlphabetic(c) || c == '_' || c == '-')) { return false; } } return true; } protected  RepositoryFeatures();  RepositoryFeatures(Map<Class<?>, EndpointFeatures<?>> endpoints); EndpointFeatures<?> getByClazz(Class<?> clazz); EndpointFeatures<?> getByPath(String endpointPath); Class<?> getClazzByKind(String kind); boolean hasCustomAction(String endpointPath, ActionKey actionKey); boolean hasCustomAction(Class<?> clazz, ActionKey actionKey); Set<Class<?>> getEndpointClazzes(); String dump();  }### Answer:
@Test public void testValidEndpointPaths() { RepositoryFeatures features = new RepositoryFeatures(); assertTrue(features.isValidEndpointPath("/parents")); assertTrue(features.isValidEndpointPath("/par_ents")); assertTrue(features.isValidEndpointPath("/par-ents")); }
@Test public void testInvalidEndpointPaths() { RepositoryFeatures features = new RepositoryFeatures(); assertFalse(features.isValidEndpointPath("parents")); assertFalse(features.isValidEndpointPath("/123parents")); assertFalse(features.isValidEndpointPath("/par?ents")); }