@Test public void testGetMap() { String seaGuid = "asladfalsd"; String url = "/educationOrganizations/" + seaGuid + "/custom"; Mockito.when(mockSlcInterface.read(url)).thenReturn(buildCustomDataList()); Map<String, List<SliEntityLocator>> result = dataProvider.getIdMap(seaGuid); Assert.assertNotNull(result); Assert.assertEquals(1, result.keySet().size()); List<SliEntityLocator> list = result.get(SIF_ID); Assert.assertNotNull(list); Assert.assertEquals(1, list.size()); SliEntityLocator locator = list.get(0); Assert.assertEquals(TYPE, locator.getType()); Assert.assertEquals(VALUE, locator.getValue()); Assert.assertEquals(FIELD, locator.getField()); }
public Map<String, List<SliEntityLocator>> getIdMap(String seaGuid) { LOG.info("Attempting to pull id map from SEA custom data, will cause exception if doesn't exist"); List<Entity> list = slcInterface.read("/educationOrganizations/" + seaGuid + "/custom"); if (list.size() > 0) { Map<String, Object> rawMap = list.get(0).getData(); return toSpecificMap(rawMap); } return new HashMap<String, List<SliEntityLocator>>(); }
SeaCustomDataProvider { public Map<String, List<SliEntityLocator>> getIdMap(String seaGuid) { LOG.info("Attempting to pull id map from SEA custom data, will cause exception if doesn't exist"); List<Entity> list = slcInterface.read("/educationOrganizations/" + seaGuid + "/custom"); if (list.size() > 0) { Map<String, Object> rawMap = list.get(0).getData(); return toSpecificMap(rawMap); } return new HashMap<String, List<SliEntityLocator>>(); } }
SeaCustomDataProvider { public Map<String, List<SliEntityLocator>> getIdMap(String seaGuid) { LOG.info("Attempting to pull id map from SEA custom data, will cause exception if doesn't exist"); List<Entity> list = slcInterface.read("/educationOrganizations/" + seaGuid + "/custom"); if (list.size() > 0) { Map<String, Object> rawMap = list.get(0).getData(); return toSpecificMap(rawMap); } return new HashMap<String, List<SliEntityLocator>>(); }  }
SeaCustomDataProvider { public Map<String, List<SliEntityLocator>> getIdMap(String seaGuid) { LOG.info("Attempting to pull id map from SEA custom data, will cause exception if doesn't exist"); List<Entity> list = slcInterface.read("/educationOrganizations/" + seaGuid + "/custom"); if (list.size() > 0) { Map<String, Object> rawMap = list.get(0).getData(); return toSpecificMap(rawMap); } return new HashMap<String, List<SliEntityLocator>>(); }  Map<String, List<SliEntityLocator>> getIdMap(String seaGuid); void storeIdMap(String seaGuid, Map<String, List<SliEntityLocator>> idMap); }
SeaCustomDataProvider { public Map<String, List<SliEntityLocator>> getIdMap(String seaGuid) { LOG.info("Attempting to pull id map from SEA custom data, will cause exception if doesn't exist"); List<Entity> list = slcInterface.read("/educationOrganizations/" + seaGuid + "/custom"); if (list.size() > 0) { Map<String, Object> rawMap = list.get(0).getData(); return toSpecificMap(rawMap); } return new HashMap<String, List<SliEntityLocator>>(); }  Map<String, List<SliEntityLocator>> getIdMap(String seaGuid); void storeIdMap(String seaGuid, Map<String, List<SliEntityLocator>> idMap);  }