assertEquals("Check foo equality", fooP, "oof");
assertEquals("Check bar equality", barP, new Integer(0));
assertEquals("Check baz equality", bazP, "zab");
// Check field value
FooService fs = (FooService) getContext().getService(fooRef);
Properties p = fs.fooProps();
fooP = (String) p.get("foo");
barP = (Integer) p.get("bar");
assertEquals("Check foo field equality", fooP, "oof");
assertEquals("Check bar field equality", barP, new Integer(0));
Integer updated = (Integer) fs.fooProps().get("updated");
Dictionary dict = (Dictionary) fs.fooProps().get("lastupdated");
assertEquals("Check updated -1", 1, updated.intValue());
assertEquals("Check last updated", 3, dict.size());
conf.put("baz", "zab2");
conf.put("foo", "oof2");
conf.put("bar", new Integer(0));
ms = (ManagedService) getContext().getService(msRef);
try {
ms.updated(conf);
} catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
updated = (Integer) fs.fooProps().get("updated");
dict = (Dictionary) fs.fooProps().get("lastupdated");
assertEquals("Check updated -2", 2, updated.intValue());
assertEquals("Check last updated", 3, dict.size());