### Question:
ResourceMappingConfiguration { static String getResourceMappingFile() { if (getStaticResourceLocation() != null) { return DEFAULT_STATIC_RESOURCE_MAPPING_LOCATION; } return getConfiguration(CoreConfiguration.Items.resourceMappingFile); }   static final String DEFAULT_STATIC_RESOURCE_MAPPING_LOCATION; }### Answer:
@Test public void testMappingFileIsNull() { configure(staticResourceLocation, (String) null); configure(resourceMappingFile, (String) null); String mappingFile = ResourceMappingConfiguration.getResourceMappingFile(); assertNull(mappingFile); }
@Test public void testMappingFileConfiguredUsingStaticResourceLocation() { configure(staticResourceLocation, "some_location"); configure(resourceMappingFile, (String) null); String mappingFile = ResourceMappingConfiguration.getResourceMappingFile(); assertEquals(ResourceMappingConfiguration.DEFAULT_STATIC_RESOURCE_MAPPING_LOCATION, mappingFile); }
@Test public void testMappingFileConfiguredWithResourceMappingFileSwitch() { String expected = "some_file"; configure(staticResourceLocation, (String) null); configure(resourceMappingFile, expected); String mappingFile = ResourceMappingConfiguration.getResourceMappingFile(); assertEquals(expected, mappingFile); }
@Test public void testMappingFileStaticResourceLocationHasPrecedence() { String wrong = "some_file"; configure(staticResourceLocation, "some_location"); configure(resourceMappingFile, wrong); String mappingFile = ResourceMappingConfiguration.getResourceMappingFile(); assertEquals(ResourceMappingConfiguration.DEFAULT_STATIC_RESOURCE_MAPPING_LOCATION, mappingFile); }