* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy;
+package org.opendaylight.controller.cluster.entityownership.selectionstrategy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import org.junit.Before;
import org.junit.Test;
-import org.mockito.MockitoAnnotations;
public class EntityOwnerSelectionStrategyConfigReaderTest {
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- }
-
@Test
public void testReadStrategies() {
final Map<Object, Object> props = new java.util.HashMap<>();
- props.put("entity.type.test", "org.opendaylight.controller.cluster.datastore.entityownership."
- + "selectionstrategy.LastCandidateSelectionStrategy,100");
+ props.put("entity.type.test",
+ "org.opendaylight.controller.cluster.entityownership.selectionstrategy.LastCandidateSelectionStrategy,100");
final EntityOwnerSelectionStrategyConfig config = EntityOwnerSelectionStrategyConfigReader
@Test(expected = IllegalArgumentException.class)
public void testReadStrategiesInvalidDelay() {
final Map<Object, Object> props = new HashMap<>();
- props.put("entity.type.test", "org.opendaylight.controller.cluster.datastore.entityownership."
- + "selectionstrategy.LastCandidateSelectionStrategy,foo");
+ props.put("entity.type.test",
+ "org.opendaylight.controller.cluster.entityownership.selectionstrategy.LastCandidateSelectionStrategy,foo");
EntityOwnerSelectionStrategyConfigReader.loadStrategyWithConfig(props);
}
@Test
public void testReadStrategiesMissingDelay() {
final Map<Object, Object> props = new HashMap<>();
- props.put("entity.type.test", "org.opendaylight.controller.cluster.datastore.entityownership."
- + "selectionstrategy.LastCandidateSelectionStrategy,100");
- props.put("entity.type.test1", "org.opendaylight.controller.cluster.datastore.entityownership."
- + "selectionstrategy.LastCandidateSelectionStrategy");
+ props.put("entity.type.test",
+ "org.opendaylight.controller.cluster.entityownership.selectionstrategy.LastCandidateSelectionStrategy,100");
+ props.put("entity.type.test1",
+ "org.opendaylight.controller.cluster.entityownership.selectionstrategy.LastCandidateSelectionStrategy");
final EntityOwnerSelectionStrategyConfig config = EntityOwnerSelectionStrategyConfigReader