@Test
public void asConfigurableServiceDefinedProperties() {

    String category = "system";
    String descriptionURI = "system:inbox";
    boolean factory = true;
    String label = "Inbox";
    Properties properties = new Properties();
    properties.put(SERVICE_PROPERTY_CATEGORY, category);
    properties.put(SERVICE_PROPERTY_DESCRIPTION_URI, descriptionURI);
    properties.put(SERVICE_PROPERTY_FACTORY_SERVICE, factory);
    properties.put(SERVICE_PROPERTY_LABEL, label);
    ConfigurableService configurableService = ConfigurableServiceUtil
            .asConfigurableService((key) -> properties.get(key));
    assertThat(configurableService.annotationType(), is(ConfigurableService.class));
    assertThat(configurableService.category(), is(category));
    assertThat(configurableService.description_uri(), is(descriptionURI));
    assertThat(configurableService.factory(), is(factory));
    assertThat(configurableService.label(), is(label));
}