@SuppressWarnings("deprecation")
@Test
public void testObserverConfig() {

  FluoConfiguration config = new FluoConfiguration();
  config.setProperty(FluoConfiguration.OBSERVER_PREFIX + "1",
      "com.foo.Observer2,configKey1=configVal1,configKey2=configVal2");
  List<ObserverSpecification> ocList = config.getObserverSpecifications();
  Assert.assertEquals(1, ocList.size());
  Assert.assertEquals("com.foo.Observer2", ocList.get(0).getClassName());
  Assert.assertEquals("configVal1", ocList.get(0).getConfiguration().getString("configKey1"));
  Assert.assertEquals("configVal2", ocList.get(0).getConfiguration().getString("configKey2"));
  Assert.assertEquals(2, ocList.get(0).getConfiguration().toMap().size());
  assertIAE("class,bad,input");
  assertIAE("index,check,,phrasecount.PhraseCounter");
  assertIAE("");
  assertIAE(" ");
  assertIAE(",key=value");
  assertIAE(",");
  assertIAE("com.foo.Observer2,configKey1=,configKey2=configVal2");
  assertIAE("com.foo.Observer2,configKey1=val,=configVal2");
  config = new FluoConfiguration();
  config.setProperty(FluoConfiguration.OBSERVER_PREFIX + "1", "Class,");
  ocList = config.getObserverSpecifications();
  Assert.assertEquals(1, ocList.size());
  Assert.assertEquals("Class", ocList.get(0).getClassName());
  Assert.assertEquals(0, ocList.get(0).getConfiguration().toMap().size());
}