X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FSimpleShardDataTreeCohortTest.java;h=34d36b058bbea8f35c5f5370df2ee8098e85918c;hp=be19a3d0da804b78abf29489bfd5449aad53e5cb;hb=12fcdfe39aa26dcba7fd3bb4d4c68e3d02e65c51;hpb=3564341bbc0a9b53c5a26becb3d03230125cba80 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java index be19a3d0da..34d36b058b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java @@ -53,7 +53,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { private SimpleShardDataTreeCohort cohort; @Before - public void setup() throws Exception { + public void setup() { MockitoAnnotations.initMocks(this); doReturn(Optional.empty()).when(mockUserCohorts).commit(); @@ -64,7 +64,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { } @Test - public void testCanCommitSuccess() throws Exception { + public void testCanCommitSuccess() { canCommitSuccess(); } @@ -82,7 +82,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { verifyNoMoreInteractions(callback); } - private void testValidatationPropagates(final Exception cause) throws DataValidationFailedException { + private void testValidatationPropagates(final Exception cause) { doAnswer(invocation -> { invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).failedCanCommit(cause); return null; @@ -97,17 +97,17 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { } @Test - public void testCanCommitWithConflictingModEx() throws DataValidationFailedException { + public void testCanCommitWithConflictingModEx() { testValidatationPropagates(new ConflictingModificationAppliedException(YangInstanceIdentifier.EMPTY, "mock")); } @Test - public void testCanCommitWithDataValidationEx() throws DataValidationFailedException { + public void testCanCommitWithDataValidationEx() { testValidatationPropagates(new DataValidationFailedException(YangInstanceIdentifier.EMPTY, "mock")); } @Test - public void testCanCommitWithIllegalArgumentEx() throws DataValidationFailedException { + public void testCanCommitWithIllegalArgumentEx() { testValidatationPropagates(new IllegalArgumentException("mock")); } @@ -131,7 +131,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { } @Test - public void testPreCommitAndCommitSuccess() throws Exception { + public void testPreCommitAndCommitSuccess() { canCommitSuccess(); final DataTreeCandidateTip candidate = preCommitSuccess(); @@ -152,7 +152,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { } @Test - public void testPreCommitWithIllegalArgumentEx() throws Exception { + public void testPreCommitWithIllegalArgumentEx() { canCommitSuccess(); final Exception cause = new IllegalArgumentException("mock"); @@ -172,7 +172,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { } @Test - public void testPreCommitWithReportedFailure() throws Exception { + public void testPreCommitWithReportedFailure() { canCommitSuccess(); final Exception cause = new IllegalArgumentException("mock");