### Question:
ResourceEndPoint { protected String getResourceClass(final String resourcePath, ResourceEndPointTemplate template) { if (template.getResourceClass() != null) { return template.getResourceClass(); } String resourceClass = bruteForceMatch(resourcePath); return resourceClass; }  @PostConstruct void load(); List<String> getQueryingDisallowedEndPoints(); Set<String> getDateRangeDisallowedEndPoints(); Set<String> getBlockGetRequestEndPoints(); Map<String, String> getResources(); Map<String, SortedSet<String>> getNameSpaceMappings(); void setNameSpaceMappings(Map<String, SortedSet<String>> nameSpaceMappings);  }### Answer:
@Test public void testGetResourceClass() { ResourceEndPointTemplate template = new ResourceEndPointTemplate(); template.setResourceClass("templateClass"); assertEquals("Should match", "templateClass", resourceEndPoint.getResourceClass("/students", template)); template.setResourceClass(null); assertEquals("Should match", "org.slc.sli.api.resources.generic.FourPartResource", resourceEndPoint.getResourceClass("/students", template)); }
@Test(expected = RuntimeException.class) public void testNoClass() { ResourceEndPointTemplate template = new ResourceEndPointTemplate(); template.setResourceClass(null); when(resourceHelper.resolveResourcePath("/students", ResourceTemplate.FOUR_PART)).thenReturn(false); when(resourceHelper.resolveResourcePath("/students", ResourceTemplate.THREE_PART)).thenReturn(false); when(resourceHelper.resolveResourcePath("/students", ResourceTemplate.TWO_PART)).thenReturn(false); when(resourceHelper.resolveResourcePath("/students", ResourceTemplate.ONE_PART)).thenReturn(false); resourceEndPoint.getResourceClass("/students", template); }