}
@Test
- public void testFailButCommitAnywayReadWriteTransaction() throws Exception {
+ public void testFailButCommitAnywayReadWriteTransaction() {
dbFailures.failButCommitAnyway();
checkCommitFails();
}
}
@Test
- public void canCommitWithOperationError() throws Exception {
+ public void canCommitWithOperationError() {
doReturn(modification).when(snapshot).newModification();
final var operationError = new RuntimeException();
final var cohort = new InMemoryDOMStoreThreePhaseCommitCohort(dataStore,
}
@Test
- public void testReadyWithMissingMandatoryData() throws Exception {
+ public void testReadyWithMissingMandatoryData() {
DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
var testNode = ImmutableNodes.newContainerBuilder()
.withNodeIdentifier(new NodeIdentifier(TestModel.MANDATORY_DATA_TEST_QNAME))
public DOMStoreTransaction operationalTx;
@Test
- public void closeSubtransactionsTest() throws Exception {
+ public void closeSubtransactionsTest() {
doThrow(UnsupportedOperationException.class).when(configTx).close();
final var forwardedTx = new DOMForwardedTransactionTestImpl("test",
*/
package org.opendaylight.mdsal.dom.spi;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-public class DOMDataTreePrefixTableTest {
-
+class DOMDataTreePrefixTableTest {
@Test
- public void basicTest() throws Exception {
- final DOMDataTreePrefixTable<Object> domDataTreePrefixTable = DOMDataTreePrefixTable.create();
- final Object testObject = new Object();
- final YangInstanceIdentifier yangInstanceIdentifier = YangInstanceIdentifier.of(QName.create("", "test"));
- final DOMDataTreeIdentifier domDataTreeIdentifier =
+ void basicTest() {
+ final var domDataTreePrefixTable = DOMDataTreePrefixTable.create();
+ final var testObject = new Object();
+ final var yangInstanceIdentifier = YangInstanceIdentifier.of(QName.create("", "test"));
+ final var domDataTreeIdentifier =
DOMDataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, yangInstanceIdentifier);
domDataTreePrefixTable.store(domDataTreeIdentifier, testObject);
domDataTreePrefixTable.remove(domDataTreeIdentifier);
assertNull(domDataTreePrefixTable.lookup(domDataTreeIdentifier));
- final DOMDataTreeIdentifier invalidDOMDataTreeIdentifier =
+ final var invalidDOMDataTreeIdentifier =
DOMDataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, yangInstanceIdentifier);
domDataTreePrefixTable.remove(invalidDOMDataTreeIdentifier);
assertNull(domDataTreePrefixTable.lookup(invalidDOMDataTreeIdentifier));
private DOMDataTreeWriteTransaction writeTx;
@Test
- void basicTest() throws Exception {
+ void basicTest() {
final var impl = new ForwardingDOMDataBroker() {
@Override
protected DOMDataBroker delegate() {
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction;
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
-public class ForwardingDOMDataReadOnlyTransactionTest extends ForwardingDOMDataReadOnlyTransaction {
+@ExtendWith(MockitoExtension.class)
+class ForwardingDOMDataReadOnlyTransactionTest {
@Mock(name = "domDataTreeReadTransaction")
- public DOMDataTreeReadTransaction domDataTreeReadTransaction;
-
- @Test
- public void basicTest() throws Exception {
- doReturn(null).when(domDataTreeReadTransaction).read(null, null);
- this.read(null, null);
- verify(domDataTreeReadTransaction).read(null, null);
-
- doReturn(null).when(domDataTreeReadTransaction).exists(null, null);
- this.exists(null, null);
- verify(domDataTreeReadTransaction).exists(null, null);
-
- doReturn(null).when(domDataTreeReadTransaction).getIdentifier();
- this.getIdentifier();
- verify(domDataTreeReadTransaction).getIdentifier();
-
- doNothing().when(domDataTreeReadTransaction).close();
- this.close();
- verify(domDataTreeReadTransaction).close();
+ private DOMDataTreeReadTransaction delegate;
+
+ private ForwardingDOMDataReadOnlyTransaction tx;
+
+ @BeforeEach
+ void beforeEach() {
+ tx = new ForwardingDOMDataReadOnlyTransaction() {
+ @Override
+ protected DOMDataTreeReadTransaction delegate() {
+ return delegate;
+ }
+ };
}
- @Override
- protected DOMDataTreeReadTransaction delegate() {
- return domDataTreeReadTransaction;
+ @Test
+ void basicTest() {
+ doReturn(null).when(delegate).read(null, null);
+ tx.read(null, null);
+ verify(delegate).read(null, null);
+
+ doReturn(null).when(delegate).exists(null, null);
+ tx.exists(null, null);
+ verify(delegate).exists(null, null);
+
+ doReturn(null).when(delegate).getIdentifier();
+ tx.getIdentifier();
+ verify(delegate).getIdentifier();
+
+ doNothing().when(delegate).close();
+ tx.close();
+ verify(delegate).close();
}
}
\ No newline at end of file
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
-public class ForwardingDOMDataWriteTransactionTest extends ForwardingDOMDataWriteTransaction {
+@ExtendWith(MockitoExtension.class)
+class ForwardingDOMDataWriteTransactionTest {
@Mock(name = "domDataTreeWriteTransaction")
- public DOMDataTreeWriteTransaction domDataTreeWriteTransaction;
+ private DOMDataTreeWriteTransaction delegate;
- @Test
- public void basicTest() throws Exception {
- doReturn(null).when(domDataTreeWriteTransaction).getIdentifier();
- this.getIdentifier();
- verify(domDataTreeWriteTransaction).getIdentifier();
-
- doNothing().when(domDataTreeWriteTransaction).put(null, null, null);
- this.put(null, null, null);
- verify(domDataTreeWriteTransaction).put(null, null, null);
-
- doNothing().when(domDataTreeWriteTransaction).merge(null, null, null);
- this.merge(null, null, null);
- verify(domDataTreeWriteTransaction).merge(null, null, null);
-
- doNothing().when(domDataTreeWriteTransaction).delete(null, null);
- this.delete(null, null);
- verify(domDataTreeWriteTransaction).delete(null, null);
-
- doReturn(null).when(domDataTreeWriteTransaction).commit();
- this.commit();
- verify(domDataTreeWriteTransaction).commit();
-
- doReturn(false).when(domDataTreeWriteTransaction).cancel();
- this.cancel();
- verify(domDataTreeWriteTransaction).cancel();
+ private ForwardingDOMDataWriteTransaction tx;
+
+ @BeforeEach
+ void beforeEach() {
+ tx = new ForwardingDOMDataWriteTransaction() {
+ @Override
+ protected DOMDataTreeWriteTransaction delegate() {
+ return delegate;
+ }
+ };
}
- @Override
- protected DOMDataTreeWriteTransaction delegate() {
- return domDataTreeWriteTransaction;
+ @Test
+ void basicTest() {
+ doReturn(null).when(delegate).getIdentifier();
+ tx.getIdentifier();
+ verify(delegate).getIdentifier();
+
+ doNothing().when(delegate).put(null, null, null);
+ tx.put(null, null, null);
+ verify(delegate).put(null, null, null);
+
+ doNothing().when(delegate).merge(null, null, null);
+ tx.merge(null, null, null);
+ verify(delegate).merge(null, null, null);
+
+ doNothing().when(delegate).delete(null, null);
+ tx.delete(null, null);
+ verify(delegate).delete(null, null);
+
+ doReturn(null).when(delegate).commit();
+ tx.commit();
+ verify(delegate).commit();
+
+ doReturn(false).when(delegate).cancel();
+ tx.cancel();
+ verify(delegate).cancel();
}
}
package org.opendaylight.mdsal.dom.spi;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import java.util.Collections;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import java.util.Set;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.dom.api.DOMRpcImplementation;
import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
-public class ForwardingDOMRpcProviderServiceTest extends ForwardingDOMRpcProviderService {
-
- @Mock(name = "domRpcProviderService")
- public DOMRpcProviderService domRpcProviderService;
-
- @Test
- public void basicTest() throws Exception {
- final DOMRpcImplementation domRpcImplementation = mock(DOMRpcImplementation.class);
-
- doReturn(null).when(domRpcProviderService).registerRpcImplementation(domRpcImplementation);
- this.registerRpcImplementation(domRpcImplementation);
- verify(domRpcProviderService).registerRpcImplementation(domRpcImplementation);
-
- doReturn(null).when(domRpcProviderService).registerRpcImplementation(domRpcImplementation,
- Collections.emptySet());
- this.registerRpcImplementation(domRpcImplementation, Collections.emptySet());
- verify(domRpcProviderService).registerRpcImplementation(domRpcImplementation, Collections.emptySet());
+@ExtendWith(MockitoExtension.class)
+class ForwardingDOMRpcProviderServiceTest {
+ @Mock
+ private DOMRpcProviderService delegate;
+ @Mock
+ private DOMRpcImplementation domRpcImplementation;
+
+ private ForwardingDOMRpcProviderService service;
+
+ @BeforeEach
+ void beforeEach() {
+ service = new ForwardingDOMRpcProviderService() {
+ @Override
+ protected DOMRpcProviderService delegate() {
+ return delegate;
+ }
+ };
}
- @Override
- protected DOMRpcProviderService delegate() {
- return domRpcProviderService;
+ @Test
+ void basicTest() {
+ doReturn(null).when(delegate).registerRpcImplementation(domRpcImplementation);
+ service.registerRpcImplementation(domRpcImplementation);
+ verify(delegate).registerRpcImplementation(domRpcImplementation);
+
+ doReturn(null).when(delegate).registerRpcImplementation(domRpcImplementation, Set.of());
+ service.registerRpcImplementation(domRpcImplementation, Set.of());
+ verify(delegate).registerRpcImplementation(domRpcImplementation, Set.of());
}
}
\ No newline at end of file
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.dom.api.DOMRpcResult;
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
-public class ForwardingDOMRpcResultTest extends ForwardingDOMRpcResult {
- @Mock(name = "domRpcResult")
- public DOMRpcResult delegate;
+@ExtendWith(MockitoExtension.class)
+class ForwardingDOMRpcResultTest {
+ @Mock
+ private DOMRpcResult delegate;
+
+ private ForwardingDOMRpcResult result;
+
+ @BeforeEach
+ void beforeEach() {
+ result = new ForwardingDOMRpcResult() {
+ @Override
+ protected DOMRpcResult delegate() {
+ return delegate;
+ }
+ };
+ }
@Test
- public void basicTest() throws Exception {
+ void basicTest() {
doReturn(null).when(delegate).errors();
- errors();
+ result.errors();
verify(delegate).errors();
doReturn(null).when(delegate).value();
- value();
+ result.value();
verify(delegate).value();
}
-
- @Override
- protected DOMRpcResult delegate() {
- return delegate;
- }
}
\ No newline at end of file
private Lock lock;
@Test
- void basicTest() throws Exception {
+ void basicTest() {
final var pathArgument = new NodeIdentifier(QName.create("", "pathArgument"));
final var registrationTreeNode = new Node<>(null, pathArgument);
try (var registrationTreeSnapshot = new AbstractRegistrationTree.Snapshot<>(lock, registrationTreeNode)) {
import org.junit.Test;
public class AbstractDOMStoreTransactionTest extends AbstractDOMStoreTransaction<String> {
-
private static final String IDENTIFIER = "testIdentifier";
@Test
- public void basicTest() throws Exception {
+ public void basicTest() {
assertEquals(IDENTIFIER, this.getIdentifier());
assertTrue(this.toString().contains(IDENTIFIER));
assertNull(this.getDebugContext());
public SnapshotBackedWriteTransaction<Object> snapshotBackedWriteTransaction;
@Test
- public void basicTest() throws Exception {
+ public void basicTest() {
doReturn(dataTreeModification).when(dataTreeSnapshot).newModification();
final var chain = new AbstractSnapshotBackedTransactionChain<>() {
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-@RunWith(MockitoJUnitRunner.StrictStubs.class)
-public class ForwardingDOMStoreThreePhaseCommitCohortTest extends ForwardingDOMStoreThreePhaseCommitCohort {
- @Mock(name = "domStoreThreePhaseCommitCohort")
- public DOMStoreThreePhaseCommitCohort domStoreThreePhaseCommitCohort;
-
- @Test
- public void basicTest() throws Exception {
- doReturn(null).when(domStoreThreePhaseCommitCohort).canCommit();
- this.canCommit();
- verify(domStoreThreePhaseCommitCohort).canCommit();
-
- doReturn(null).when(domStoreThreePhaseCommitCohort).preCommit();
- this.preCommit();
- verify(domStoreThreePhaseCommitCohort).preCommit();
-
- doReturn(null).when(domStoreThreePhaseCommitCohort).commit();
- this.commit();
- verify(domStoreThreePhaseCommitCohort).commit();
-
- doReturn(null).when(domStoreThreePhaseCommitCohort).abort();
- this.abort();
- verify(domStoreThreePhaseCommitCohort).abort();
+import org.mockito.junit.jupiter.MockitoExtension;
+
+@ExtendWith(MockitoExtension.class)
+class ForwardingDOMStoreThreePhaseCommitCohortTest {
+ @Mock
+ private DOMStoreThreePhaseCommitCohort delegate;
+
+ private ForwardingDOMStoreThreePhaseCommitCohort cohort;
+
+ @BeforeEach
+ void beforeEach() {
+ cohort = new ForwardingDOMStoreThreePhaseCommitCohort() {
+ @Override
+ protected DOMStoreThreePhaseCommitCohort delegate() {
+ return delegate;
+ }
+ };
}
- @Override
- protected DOMStoreThreePhaseCommitCohort delegate() {
- return domStoreThreePhaseCommitCohort;
+ @Test
+ void basicTest() {
+ doReturn(null).when(delegate).canCommit();
+ cohort.canCommit();
+ verify(delegate).canCommit();
+
+ doReturn(null).when(delegate).preCommit();
+ cohort.preCommit();
+ verify(delegate).preCommit();
+
+ doReturn(null).when(delegate).commit();
+ cohort.commit();
+ verify(delegate).commit();
+
+ doReturn(null).when(delegate).abort();
+ cohort.abort();
+ verify(delegate).abort();
}
}
\ No newline at end of file
*/
package org.opendaylight.mdsal.dom.spi.store;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.TransactionReadyPrototype;
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeModification;
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot;
-public class SnapshotBackedTransactionsTest {
+@ExtendWith(MockitoExtension.class)
+class SnapshotBackedTransactionsTest {
+ @Mock
+ private DataTreeSnapshot dataTreeSnapshot;
+ @Mock
+ private DataTreeModification dataTreeModification;
+ @Mock
+ private TransactionReadyPrototype<Object> transactionReadyPrototype;
+
@Test
- public void basicTest() throws Exception {
- final DataTreeSnapshot dataTreeSnapshot = mock(DataTreeSnapshot.class);
- final DataTreeModification dataTreeModification = mock(DataTreeModification.class);
- final TransactionReadyPrototype<Object> transactionReadyPrototype = mock(TransactionReadyPrototype.class);
+ void basicTest() {
doReturn(dataTreeModification).when(dataTreeSnapshot).newModification();
assertNotNull(SnapshotBackedTransactions.newReadTransaction(new Object(), false, dataTreeSnapshot));
package org.opendaylight.mdsal.dom.spi.store;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import com.google.common.base.MoreObjects;
-import java.io.Serial;
import java.util.Optional;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.TransactionReadyPrototype;
import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot;
public class SnapshotBackedWriteTransactionTest {
-
private static final DataTreeSnapshot DATA_TREE_SNAPSHOT = mock(DataTreeSnapshot.class);
private static final DataTreeModification DATA_TREE_MODIFICATION = mock(DataTreeModification.class);
private static final TransactionReadyPrototype<Object> TRANSACTION_READY_PROTOTYPE =
mock(DOMStoreThreePhaseCommitCohort.class);
private static final ContainerNode NORMALIZED_NODE = mock(ContainerNode.class);
private static final Optional<ContainerNode> NORMALIZED_NODE_OPTIONAL = Optional.of(NORMALIZED_NODE);
- private static SnapshotBackedWriteTransaction<Object> snapshotBackedWriteTransaction;
+
+ private SnapshotBackedWriteTransaction<Object> snapshotBackedWriteTransaction;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
doReturn(DATA_TREE_MODIFICATION).when(DATA_TREE_SNAPSHOT).newModification();
doNothing().when(DATA_TREE_MODIFICATION).ready();
doNothing().when(DATA_TREE_MODIFICATION).write(any(), any());
}
@Test
- public void basicTest() throws Exception {
+ public void basicTest() {
snapshotBackedWriteTransaction.write(YangInstanceIdentifier.of(), NORMALIZED_NODE);
verify(DATA_TREE_MODIFICATION).write(any(), any());
}
@Test
- public void readyTest() throws Exception {
- SnapshotBackedWriteTransaction<Object> tx = new SnapshotBackedWriteTransaction<>(new Object(), false,
- DATA_TREE_SNAPSHOT, TRANSACTION_READY_PROTOTYPE);
- Assert.assertNotNull(tx.ready());
+ public void readyTest() {
+ final var tx = new SnapshotBackedWriteTransaction<>(new Object(), false, DATA_TREE_SNAPSHOT,
+ TRANSACTION_READY_PROTOTYPE);
+ assertNotNull(tx.ready());
verify(TRANSACTION_READY_PROTOTYPE).transactionReady(any(), any(), eq(null));
tx.close();
}
public void readyWithException() {
Exception thrown = new RuntimeException();
doThrow(thrown).when(DATA_TREE_MODIFICATION).ready();
- Assert.assertNotNull(snapshotBackedWriteTransaction.ready());
+ assertNotNull(snapshotBackedWriteTransaction.ready());
verify(TRANSACTION_READY_PROTOTYPE).transactionReady(any(), any(), same(thrown));
}
- @Test(expected = IllegalArgumentException.class)
- public void writeWithException() throws Exception {
+ @Test
+ public void writeWithException() {
doAnswer(inv -> {
throw new TestException();
}).when(DATA_TREE_MODIFICATION).write(any(), any());
- snapshotBackedWriteTransaction.write(YangInstanceIdentifier.of(), NORMALIZED_NODE);
+ assertThrows(IllegalArgumentException.class,
+ () -> snapshotBackedWriteTransaction.write(YangInstanceIdentifier.of(), NORMALIZED_NODE));
}
- @Test(expected = IllegalArgumentException.class)
- public void mergeWithException() throws Exception {
+ @Test
+ public void mergeWithException() {
doAnswer(inv -> {
throw new TestException();
}).when(DATA_TREE_MODIFICATION).merge(any(), any());
- snapshotBackedWriteTransaction.merge(YangInstanceIdentifier.of(), NORMALIZED_NODE);
+ assertThrows(IllegalArgumentException.class,
+ () -> snapshotBackedWriteTransaction.merge(YangInstanceIdentifier.of(), NORMALIZED_NODE));
}
- @Test(expected = IllegalArgumentException.class)
- public void deleteWithException() throws Exception {
+ @Test
+ public void deleteWithException() {
doAnswer(inv -> {
throw new TestException();
}).when(DATA_TREE_MODIFICATION).delete(any());
- snapshotBackedWriteTransaction.delete(YangInstanceIdentifier.of());
+ assertThrows(IllegalArgumentException.class,
+ () -> snapshotBackedWriteTransaction.delete(YangInstanceIdentifier.of()));
}
private static final class TestException extends Exception {
- @Serial
+ @java.io.Serial
private static final long serialVersionUID = 1L;
}
}
\ No newline at end of file
}
@Test
- void testToString() throws Exception {
+ void testToString() {
final var uuid = UUID.randomUUID();
final var expected = String.format("SimpleDOMEntityOwnershipService{uuid=%s, entities={}, listeners={}}", uuid);
assertEquals(expected, new SimpleDOMEntityOwnershipService(uuid).toString());
class HostBuilderTest {
@Test
- void testGetDefaultInstance() throws Exception {
+ void testGetDefaultInstance() {
testIpv4("1.1.1.1");
testIpv4("192.168.155.100");
testIpv4("1.192.1.221");
class IpAddressBuilderTest {
@Test
- void testGetDefaultInstance() throws Exception {
+ void testGetDefaultInstance() {
testIpv4("1.1.1.1");
testIpv4("192.168.155.100");
testIpv4("1.192.1.221");
class IpAddressNoZoneBuilderTest {
@Test
- void testGetDefaultInstance() throws Exception {
+ void testGetDefaultInstance() {
testIpv4("1.1.1.1");
testIpv4("192.168.155.100");
testIpv4("1.192.1.221");
class IpPrefixBuilderTest {
@Test
- void testGetDefaultInstance() throws Exception {
+ void testGetDefaultInstance() {
testIpv6("ff00::/8");
testIpv4("192.0.2.1/24");
}