@Test
public void testReadStrategies() {

    final Map<Object, Object> props = new java.util.HashMap<>();
    props.put("entity.type.test",
        "org.opendaylight.controller.cluster.entityownership.selectionstrategy.LastCandidateSelectionStrategy,100");
    final EntityOwnerSelectionStrategyConfig config = EntityOwnerSelectionStrategyConfigReader
            .loadStrategyWithConfig(props);
    assertTrue(config.isStrategyConfigured("test"));
    final EntityOwnerSelectionStrategy strategy = config.createStrategy("test",
            Collections.<String, Long>emptyMap());
    assertTrue(strategy.toString(), strategy instanceof LastCandidateSelectionStrategy);
    assertEquals(100L, strategy.getSelectionDelayInMillis());
    final EntityOwnerSelectionStrategy strategy1 = config.createStrategy("test", Collections.emptyMap());
    assertEquals(strategy, strategy1);
    config.clearStrategies();
    final EntityOwnerSelectionStrategy strategy2 = config.createStrategy("test", Collections.emptyMap());
    assertNotEquals(strategy1, strategy2);
}