@Test
public void testAddModuleShardConfiguration() throws Exception {

    URI namespace = new URI("urn:opendaylight:test:oven");
    String moduleName = "oven";
    String shardName = "oven-shard";
    String shardStrategyName = ModuleShardStrategy.NAME;
    Collection<MemberName> shardMemberNames = ImmutableSortedSet.of(MEMBER_1, MEMBER_4, MEMBER_5);
    configuration.addModuleShardConfiguration(new ModuleShardConfiguration(namespace, moduleName, shardName,
            shardStrategyName, shardMemberNames));
    assertEquals("getMemberShardNames", ImmutableSortedSet.of("people-1", "cars-1", "test-1", "default", shardName),
            ImmutableSortedSet.copyOf(configuration.getMemberShardNames(MEMBER_1)));
    assertEquals("getMemberShardNames", ImmutableSortedSet.of(shardName),
            ImmutableSortedSet.copyOf(configuration.getMemberShardNames(MEMBER_4)));
    assertEquals("getMemberShardNames", ImmutableSortedSet.of(shardName),
            ImmutableSortedSet.copyOf(configuration.getMemberShardNames(MEMBER_5)));
    assertEquals("getMembersFromShardName", shardMemberNames,
            ImmutableSortedSet.copyOf(configuration.getMembersFromShardName(shardName)));
    assertEquals("getShardNameForModule", shardName, configuration.getShardNameForModule(moduleName));
    assertEquals("getModuleNameFromNameSpace", moduleName,
            configuration.getModuleNameFromNameSpace(namespace.toASCIIString()));
    assertEquals("getAllShardNames", ImmutableSortedSet.of("people-1", "cars-1", "test-1", "default", shardName),
            ImmutableSortedSet.copyOf(configuration.getAllShardNames()));
    ShardStrategy strategy = configuration.getStrategyForModule("cars");
    assertNotNull("getStrategyForModule null", strategy);
    assertEquals("getStrategyForModule type", ModuleShardStrategy.class, strategy.getClass());
}