+ ShardStrategyFactory factory;
+
+ @Rule
+ public ExpectedException expectedEx = ExpectedException.none();
+
+ @Before
+ public void setUp() {
+ factory = new ShardStrategyFactory(new ConfigurationImpl("module-shards.conf", "modules.conf"));
+ }
+
+ @Test
+ public void testGetStrategy() {
+ ShardStrategy strategy = factory.getStrategy(TestModel.TEST_PATH);
+ assertNotNull(strategy);
+ }
+
+ @Test
+ public void testGetStrategyForKnownModuleName() {
+ ShardStrategy strategy = factory.getStrategy(YangInstanceIdentifier.of(CarsModel.BASE_QNAME));
+ assertTrue(strategy instanceof ModuleShardStrategy);
+ }