@Test
public void testSupports_String()
{

    System.out.println("supports(String)");
    DSpaceServicesFactory.getInstance().getConfigurationService().setProperty("handle.prefix", "123456789");
    DSpaceServicesFactory.getInstance().getConfigurationService().setProperty("handle.additional.prefixes", "123456789.1,123456789.2");
    
    // We have to get Spring to instantiate the provider as a Bean, because
    // the bean class has autowired fields.
    HandleIdentifierProvider instance = new HandleIdentifierProvider();
    applicationContext.getAutowireCapableBeanFactory().autowireBeanProperties(
            instance, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true);
    // Load the test cases
    Properties forms = new Properties();
    try {
        forms.load(this.getClass().getResourceAsStream("handle-forms.properties"));
    } catch (IOException e) {
        System.err.format("Could not load handle-forms.properties:  %s%n", e.getMessage());
        return;
    }
    // Test each case
    for (Map.Entry<Object, Object> entry : forms.entrySet())
    {
        String identifier = (String)entry.getKey();
        boolean expResult = Boolean.parseBoolean((String)entry.getValue());
        boolean result = instance.supports(identifier);
        String message = expResult ?
                "This provider should support " + identifier :
                "This provider should not support " + identifier;
        assertEquals(message, expResult, result);
    }
}