1 package org.opendaylight.controller.cluster.datastore.shardstrategy;
5 import org.junit.rules.ExpectedException;
6 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
8 import static junit.framework.Assert.assertNotNull;
10 public class ShardStrategyFactoryTest {
13 public ExpectedException expectedEx = ExpectedException.none();
16 public void testGetStrategy(){
17 ShardStrategy strategy = ShardStrategyFactory.getStrategy(TestModel.TEST_PATH);
18 assertNotNull(strategy);
22 public void testGetStrategyNullPointerExceptionWhenPathIsNull(){
23 expectedEx.expect(NullPointerException.class);
24 expectedEx.expectMessage("path should not be null");
26 ShardStrategyFactory.getStrategy(null);