### Question:
DidSchemaParser implements ResourceLoaderAware { public Map<String, List<DidNaturalKey>> getNaturalKeys() { return naturalKeys; }  String getExtensionXsdLocation(); void setExtensionXsdLocation(String entensionXsdLocation); String getExtensionXsdParentLocation(); void setExtensionXsdParentLocation(String extensionXsdParentLocation); String getXsdParentLocation(); void setXsdParentLocation(String xsdParentLocation); String getXsdLocation(); void setXsdLocation(String xsdLocation); Map<String, List<DidNaturalKey>> getNaturalKeys(); void setNaturalKeys(Map<String, List<DidNaturalKey>> naturalKeys); @Override void setResourceLoader(ResourceLoader resourceLoader); @PostConstruct void setup(); Map<String, DidRefConfig> getRefConfigs(); Map<String, DidEntityConfig> getEntityConfigs(); Map<String, List<DidNaturalKey>> extractNaturalKeys();  }### Answer:
@Test public void shouldextractNaturalKeys() { Map<String, List<DidNaturalKey>> naturalKeys = didSchemaParser.getNaturalKeys(); Assert.assertNotNull(naturalKeys); Assert.assertTrue(naturalKeys.containsKey("learningObjective")); List<DidNaturalKey> keys = naturalKeys.get("learningObjective"); Assert.assertNotNull(keys); Assert.assertEquals(3, keys.size()); Assert.assertEquals("Objective", keys.get(0).getNaturalKeyName()); Assert.assertFalse(keys.get(0).isOptional); Assert.assertTrue(naturalKeys.containsKey("localEducationAgency")); keys = naturalKeys.get("localEducationAgency"); Assert.assertNotNull(keys); Assert.assertEquals(1, keys.size()); Assert.assertEquals("StateOrganizationId", keys.get(0).getNaturalKeyName()); Assert.assertFalse(keys.get(0).isOptional); Assert.assertTrue(naturalKeys.containsKey("studentCompetency")); keys = naturalKeys.get("studentCompetency"); Assert.assertNotNull(keys); Assert.assertEquals(4, keys.size()); Assert.assertEquals("CompetencyLevel.CodeValue", keys.get(1).getNaturalKeyName()); Assert.assertFalse(keys.get(1).isOptional); Assert.assertEquals("LearningObjectiveReference", keys.get(3).getNaturalKeyName()); Assert.assertTrue(keys.get(3).isOptional); Assert.assertTrue(naturalKeys.containsKey("attendance")); keys = naturalKeys.get("attendance"); Assert.assertNotNull(keys); Assert.assertEquals(4, keys.size()); Assert.assertEquals("StateOrganizationId", keys.get(1).getNaturalKeyName()); Assert.assertFalse(keys.get(1).isOptional); Assert.assertTrue(naturalKeys.containsKey("reportCard")); keys = naturalKeys.get("reportCard"); Assert.assertNotNull(keys); Assert.assertEquals(2, keys.size()); Assert.assertEquals("GradingPeriodReference", keys.get(1).getNaturalKeyName()); Assert.assertFalse(keys.get(1).isOptional); Assert.assertTrue(naturalKeys.containsKey("program")); keys = naturalKeys.get("program"); Assert.assertNotNull(keys); Assert.assertEquals(1, keys.size()); Assert.assertEquals("ProgramId", keys.get(0).getNaturalKeyName()); Assert.assertFalse(keys.get(0).isOptional); }