@Test
public void testGetRegisteredResource(TestContext context) {

    Async async = context.async();
    MockResourceStorage storage = new MockResourceStorage();
    configurationResourceManager = new ConfigurationResourceManager(vertx, storage);
    String resourceURI = "/gateleen/resources/person";
    configurationResourceManager.registerResource(resourceURI, PERSON_SCHEMA);
    ConfigurationResourceObserver observer = Mockito.spy(new TestConfigurationResourceObserver());
    configurationResourceManager.registerObserver(observer, resourceURI);
    PersonResourceRequest request = new PersonResourceRequest(HttpMethod.PUT, resourceURI,
            resourceURI, CONTENT_MATCHING_PERSON_SCHEMA, new DummyHttpServerResponse());
    // resource should not be in storage
    context.assertFalse(storage.getMockData().containsKey(resourceURI));
    boolean handled = configurationResourceManager.handleConfigurationResource(request);
    context.assertTrue(handled, "PUT Request to configuration resource should be handled");
    // resource should be in storage
    await().atMost(3, SECONDS).until( () -> storage.getMockData().get(resourceURI), equalTo(CONTENT_MATCHING_PERSON_SCHEMA));
    configurationResourceManager.getRegisteredResource(resourceURI).setHandler(event -> {
        context.assertTrue(event.succeeded());
        context.assertTrue(event.result().isPresent());
        context.assertEquals(CONTENT_MATCHING_PERSON_SCHEMA, event.result().get().toString());
        async.complete();
    });
}