*/
package org.opendaylight.controller.cluster.databroker.actors.dds;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.TRANSACTION_ID;
import com.google.common.util.concurrent.FluentFuture;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.Optional;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
public void testExists() throws Exception {
final FluentFuture<Boolean> exists = getHandle().exists(PATH);
verify(modification).readNode(PATH);
- Assert.assertTrue(getWithTimeout(exists));
+ assertEquals(Boolean.TRUE, getWithTimeout(exists));
}
@Test
final FluentFuture<Optional<NormalizedNode<?, ?>>> resultFuture = getHandle().read(PATH);
verify(modification).readNode(PATH);
final Optional<NormalizedNode<?, ?>> result = getWithTimeout(resultFuture);
- Assert.assertTrue(result.isPresent());
- Assert.assertEquals(DATA, result.get());
+ assertTrue(result.isPresent());
+ assertEquals(DATA, result.get());
}
@Test
@Test
public void testReadyEmpty() throws Exception {
final DOMStoreThreePhaseCommitCohort cohort = getHandle().ready();
- assertFutureEquals(true, cohort.canCommit());
+ assertFutureEquals(Boolean.TRUE, cohort.canCommit());
assertFutureEquals(null, cohort.preCommit());
assertFutureEquals(null, cohort.commit());
}
final ListenableFuture<Boolean> actual = cohort.canCommit();
final CommitLocalTransactionRequest request =
backendRespondToRequest(CommitLocalTransactionRequest.class, response);
- Assert.assertEquals(modification, request.getModification());
- assertFutureEquals(true, actual);
+ assertEquals(modification, request.getModification());
+ assertFutureEquals(Boolean.TRUE, actual);
assertFutureEquals(null, cohort.preCommit());
assertFutureEquals(null, cohort.commit());
}