@Test
public void testPhysicalSourceConfig() throws IOException {

	ObjectMapper mapper = new ObjectMapper();
	InputStreamReader isr = new InputStreamReader(IOUtils.toInputStream(_configSource));
	//PhysicalSourceConfig physicalSourceConfig = mapper.readValue(sourcesJson, PhysicalSourceConfig.class);
	PhysicalSourceConfig physicalSourceConfig = mapper.readValue(isr, PhysicalSourceConfig.class);
	PhysicalSourceStaticConfig pStatic=null;
	try {
	  physicalSourceConfig.checkForNulls();
	  pStatic = physicalSourceConfig.build();
	} catch (InvalidConfigException e) {
	  fail("PhysicalSourceConfig.checkForNulls failed.", e);
	}
	// also assert basic stuff
	assertNotNull("Uri is null.", pStatic.getUri());
	assertNotNull("Name is null.", pStatic.getName());
	assertEquals(100, pStatic.getId(),"physical source id mismatch:");
	List<LogicalSourceConfig>lSources = physicalSourceConfig.getSources();
	assertEquals(4, lSources.size(), "number of logical sources");
	LogicalSourceStaticConfig lSource=null;
	try
	{
	  lSource = lSources.get(0).build();
	}
	catch (InvalidConfigException e)
	{
	  fail("get LogicalSourceStaticConfig failed", e);
	}
	assertEquals(2, lSource.getId(), "logical source id");
}