Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Not like this
public void testConfiguration_shouldHaveWrittenTheLaterOne() throws Exception {
ServiceReference[] allServiceReferences = ctx.getAllServiceReferences(ConfigurationAdmin.class.getName(), null);
for (ServiceReference serviceReference : allServiceReferences) {
ConfigurationAdmin service = (ConfigurationAdmin) ctx.getService(serviceReference);
try { configuration = service.getConfiguration("tests");
assertEquals("myvalue2", configuration.getProperties().get("mykey"));
} catch (Exception e) {
// continue

leadVisionary commented Sep 5, 2012

I like it when the code is both functional and self-critiquing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment