Organize Imports for Checkstyle compliance.
Checkstyle compliance: line length.
Checkstyle compliance: various types of small changes.
Checkstyle compliant Exception handling.
Checkstyle final clean up & enforcement.
Add the fail on violation flag into the pom.xml .
Change-Id: I690d1d6c21f042874977f1030f216b08c4c21c45
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
package org.opendaylight.netconf.topology.singleton.api;
/**
- * Provides API for advertising services for blue print service
+ * Provides API for advertising services for blue print service.
*/
public interface NetconfTopologySingletonService {
}
import akka.actor.ActorRef;
/**
- * Provides API for connection odl (master) with device
+ * Provides API for connection odl (master) with device.
*/
public interface RemoteDeviceConnector {
/**
- * Create device communicator and open device connection
+ * Create device communicator and open device connection.
* @param masterActorRef master actor reference
*/
void startRemoteDeviceConnection(ActorRef masterActorRef);
/**
- * Stop device communicator
+ * Stop device communicator.
*/
void stopRemoteDeviceConnection();
}
salProvider.getMountInstance().onTopologyDeviceDisconnected();
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
private void closeGracefully(final AutoCloseable resource) {
if (resource != null) {
try {
import java.util.Collection;
import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
break;
case WRITE:
if (rootNode.getDataBefore() != null) {
- LOG.debug("{}: Operational for node {} rewrited. Trying to register slave mount point", id, nodeId);
+ LOG.debug("{}: Operational for node {} rewrited. Trying to register slave mount point",
+ id, nodeId);
} else {
- LOG.debug("{}: Operational for node {} created. Trying to register slave mount point", id, nodeId);
+ LOG.debug("{}: Operational for node {} created. Trying to register slave mount point",
+ id, nodeId);
}
handleSlaveMountPoint(rootNode);
break;
}
if (!finalClose) {
- final String masterAddress = Cluster.get(netconfTopologyDeviceSetup.getActorSystem()).selfAddress().toString();
+ final String masterAddress =
+ Cluster.get(netconfTopologyDeviceSetup.getActorSystem()).selfAddress().toString();
masterActorRef = netconfTopologyDeviceSetup.getActorSystem().actorOf(NetconfNodeActor.props(
netconfTopologyDeviceSetup, remoteDeviceId, DEFAULT_SCHEMA_REPOSITORY, DEFAULT_SCHEMA_REPOSITORY,
actorResponseWaitTime, mountService),
}
/**
- * If configuration data was changed
+ * Refresh, if configuration data was changed.
* @param setup new setup
*/
void refresh(@Nonnull final NetconfTopologySetup setup) {
contexts.put(instanceIdentifier, newNetconfTopologyContext);
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
private void stopNetconfDeviceContext(final InstanceIdentifier<Node> instanceIdentifier) {
if (contexts.containsKey(instanceIdentifier)) {
try {
}
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public void close() {
if (dataChangeListenerRegistration != null) {
NetconfTopologyUtils.createTopologyListPath(topologyId).child(Node.class)), this);
}
- private void initTopology(final WriteTransaction wtx, final LogicalDatastoreType datastoreType, final String topologyId) {
+ private void initTopology(final WriteTransaction wtx, final LogicalDatastoreType datastoreType,
+ final String topologyId) {
final NetworkTopology networkTopology = new NetworkTopologyBuilder().build();
final InstanceIdentifier<NetworkTopology> networkTopologyId =
InstanceIdentifier.builder(NetworkTopology.class).build();
private final ActorSystem actorSystem;
/**
+ * Constructor for {@code ProxyDOMDataBroker}.
+ *
* @param actorSystem system
* @param id id
* @param masterNode {@link org.opendaylight.netconf.topology.singleton.impl.actors.NetconfNodeActor} ref
this.askTimeout = askTimeout;
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public DOMDataReadOnlyTransaction newReadOnlyTransaction() {
final Future<Object> txActorFuture = Patterns.ask(masterNode, new NewReadTransactionRequest(), askTimeout);
}
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public DOMDataReadWriteTransaction newReadWriteTransaction() {
final Future<Object> txActorFuture = Patterns.ask(masterNode, new NewReadWriteTransactionRequest(), askTimeout);
}
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public DOMDataWriteTransaction newWriteOnlyTransaction() {
final Future<Object> txActorFuture = Patterns.ask(masterNode, new NewWriteTransactionRequest(), askTimeout);
final CheckedFuture<DOMRpcResult, DOMRpcException> checkedFuture = Futures.makeChecked(settableFuture,
new Function<Exception, DOMRpcException>() {
- @Nullable
- @Override
- public DOMRpcException apply(@Nullable final Exception exception) {
- return new ClusteringRpcException(id + ": Exception during remote rpc invocation.",
- exception);
- }
- });
+ @Nullable
+ @Override
+ public DOMRpcException apply(@Nullable final Exception exception) {
+ return new ClusteringRpcException(id + ": Exception during remote rpc invocation.",
+ exception);
+ }
+ });
scalaFuture.onComplete(new OnComplete<Object>() {
@Override
final NormalizedNodeMessage normalizedNodeMessageResult =
((InvokeRpcMessageReply) success).getNormalizedNodeMessage();
final DOMRpcResult result;
- if (normalizedNodeMessageResult == null ){
+ if (normalizedNodeMessageResult == null) {
result = new DefaultDOMRpcResult(errors);
} else {
if (errors == null) {
});
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public void stopRemoteDeviceConnection() {
Preconditions.checkNotNull(deviceCommunicatorDTO, remoteDeviceId + ": Device communicator was not created.");
//non-module capabilities should not exist in yang module capabilities
final NetconfSessionPreferences netconfSessionPreferences = NetconfSessionPreferences.fromStrings(capabilities);
- Preconditions.checkState(netconfSessionPreferences.getNonModuleCaps().isEmpty(), "List yang-module-capabilities/capability " +
- "should contain only module based capabilities. Non-module capabilities used: " +
- netconfSessionPreferences.getNonModuleCaps());
+ Preconditions.checkState(netconfSessionPreferences.getNonModuleCaps().isEmpty(),
+ "List yang-module-capabilities/capability should contain only module based capabilities. "
+ + "Non-module capabilities used: " + netconfSessionPreferences.getNonModuleCaps());
if (node.getNonModuleCapabilities() != null) {
capabilities.addAll(node.getNonModuleCapabilities().getCapability());
final AuthenticationHandler authHandler;
final Credentials credentials = node.getCredentials();
- if (credentials instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPassword) {
+ if (credentials instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf
+ .node.credentials.credentials.LoginPassword) {
authHandler = new LoginPassword(
- ((org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPassword) credentials).getUsername(),
- ((org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPassword) credentials).getPassword());
+ ((org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf
+ .node.credentials.credentials.LoginPassword) credentials).getUsername(),
+ ((org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf
+ .node.credentials.credentials.LoginPassword) credentials).getPassword());
} else {
throw new IllegalStateException(remoteDeviceId + ": Only login/password authentication is supported");
}
salProvider.getMountInstance().onTopologyDeviceDisconnected();
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
public void close() {
unregisterSlaveMountPoint();
try {
this.mountPointService = mountPointService;
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public void onReceive(final Object message) throws Exception {
if (message instanceof CreateInitialMasterActorData) { // master
private final DOMDataReadTransaction tx;
- public ReadAdapter(final DOMDataReadTransaction tx) {
+ ReadAdapter(final DOMDataReadTransaction tx) {
this.tx = tx;
}
+ @SuppressWarnings("checkstyle:IllegalThrows")
public void handle(final Object message, final ActorRef sender, final ActorRef self) throws Throwable {
if (message instanceof ReadRequest) {
class WriteAdapter {
private final DOMDataWriteTransaction tx;
- public WriteAdapter(final DOMDataWriteTransaction tx) {
+ WriteAdapter(final DOMDataWriteTransaction tx) {
this.tx = tx;
}
private final ActorSystem actorSystem;
private final Timeout askTimeout;
- public ProxyReadAdapter(final ActorRef masterTxActor, final RemoteDeviceId id, final ActorSystem actorSystem,
+ ProxyReadAdapter(final ActorRef masterTxActor, final RemoteDeviceId id, final ActorSystem actorSystem,
final Timeout askTimeout) {
this.masterTxActor = masterTxActor;
this.id = id;
private final ProxyReadAdapter delegate;
/**
+ * Constructor for {@code ProxyReadTransaction}.
+ *
* @param masterTxActor {@link org.opendaylight.netconf.topology.singleton.impl.actors.ReadTransactionActor} ref
* @param id device id
* @param actorSystem system
- * @param askTimeout
+ * @param askTimeout timeout
*/
public ProxyReadTransaction(final ActorRef masterTxActor, final RemoteDeviceId id, final ActorSystem actorSystem,
final Timeout askTimeout) {
private final ProxyWriteAdapter delegateWrite;
/**
- * @param masterTxActor {@link org.opendaylight.netconf.topology.singleton.impl.actors.ReadWriteTransactionActor} ref
+ * Constructor for {@code ProxyReadWriteTransaction}.
+ *
+ * @param masterTxActor
+ * {@link org.opendaylight.netconf.topology.singleton.impl.actors.ReadWriteTransactionActor} ref
* @param id device id
* @param actorSystem system
- * @param askTimeout
+ * @param askTimeout timeout
*/
public ProxyReadWriteTransaction(final ActorRef masterTxActor, final RemoteDeviceId id,
final ActorSystem actorSystem, final Timeout askTimeout) {
this.askTimeout = askTimeout;
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
public boolean cancel() {
if (!opened.compareAndSet(true, false)) {
return false;
private final ProxyWriteAdapter proxyWriteAdapter;
/**
+ * Constructor for {@code ProxyWriteTransaction}.
+ *
* @param masterTxActor {@link org.opendaylight.netconf.topology.singleton.impl.actors.WriteTransactionActor} ref
* @param id device id
* @param actorSystem system
- * @param askTimeout
+ * @param askTimeout timeout
*/
public ProxyWriteTransaction(final ActorRef masterTxActor, final RemoteDeviceId id, final ActorSystem actorSystem,
final Timeout askTimeout) {
proxyWriteAdapter = new ProxyWriteAdapter(masterTxActor, id, actorSystem, askTimeout);
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public boolean cancel() {
return proxyWriteAdapter.cancel();
import java.math.BigDecimal;
import java.net.InetSocketAddress;
import java.util.HashMap;
-import org.opendaylight.controller.config.util.xml.DocumentedException;
import java.util.Map;
+import org.opendaylight.controller.config.util.xml.DocumentedException;
import org.opendaylight.netconf.sal.connect.netconf.NetconfDevice;
import org.opendaylight.netconf.sal.connect.netconf.NetconfStateSchemasResolverImpl;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
* of the schema cache directory, and the value is a corresponding <code>SchemaResourcesDTO</code>. The
* <code>SchemaResourcesDTO</code> is essentially a container that allows for the extraction of the
* <code>SchemaRegistry</code> and <code>SchemaContextFactory</code> which should be used for a particular
- * Netconf mount. Access to <code>schemaResourcesDTOs</code> should be surrounded by appropriate
+ * Netconf mount. Access to <code>SCHEMA_RESOURCES_DTO_MAP</code> should be surrounded by appropriate
* synchronization locks.
*/
- private static final Map<String, NetconfDevice.SchemaResourcesDTO> schemaResourcesDTOs = new HashMap<>();
+ private static final Map<String, NetconfDevice.SchemaResourcesDTO> SCHEMA_RESOURCES_DTO_MAP = new HashMap<>();
// Initializes default constant instances for the case when the default schema repository
// directory cache/schema is used.
static {
- schemaResourcesDTOs.put(DEFAULT_CACHE_DIRECTORY,
+ SCHEMA_RESOURCES_DTO_MAP.put(DEFAULT_CACHE_DIRECTORY,
new NetconfDevice.SchemaResourcesDTO(DEFAULT_SCHEMA_REPOSITORY, DEFAULT_SCHEMA_REPOSITORY,
DEFAULT_SCHEMA_CONTEXT_FACTORY, new NetconfStateSchemasResolverImpl()));
DEFAULT_SCHEMA_REPOSITORY.registerSchemaSourceListener(DEFAULT_CACHE);
if (!moduleSchemaCacheDirectory.equals(DEFAULT_CACHE_DIRECTORY)) {
// Multiple modules may be created at once; synchronize to avoid issues with data consistency among
// threads.
- synchronized (schemaResourcesDTOs) {
+ synchronized (SCHEMA_RESOURCES_DTO_MAP) {
// Look for the cached DTO to reuse SchemaRegistry and SchemaContextFactory variables if
// they already exist
- schemaResourcesDTO = schemaResourcesDTOs.get(moduleSchemaCacheDirectory);
+ schemaResourcesDTO = SCHEMA_RESOURCES_DTO_MAP.get(moduleSchemaCacheDirectory);
if (schemaResourcesDTO == null) {
schemaResourcesDTO = createSchemaResourcesDTO(moduleSchemaCacheDirectory);
schemaResourcesDTO.getSchemaRegistry().registerSchemaSourceListener(
TextToASTTransformer.create((SchemaRepository) schemaResourcesDTO.getSchemaRegistry(),
schemaResourcesDTO.getSchemaRegistry())
);
- schemaResourcesDTOs.put(moduleSchemaCacheDirectory, schemaResourcesDTO);
+ SCHEMA_RESOURCES_DTO_MAP.put(moduleSchemaCacheDirectory, schemaResourcesDTO);
}
}
LOG.info("{} : netconf connector will use schema cache directory {} instead of {}",
}
if (schemaResourcesDTO == null) {
- synchronized (schemaResourcesDTOs) {
- schemaResourcesDTO = schemaResourcesDTOs.get(DEFAULT_CACHE_DIRECTORY);
+ synchronized (SCHEMA_RESOURCES_DTO_MAP) {
+ schemaResourcesDTO = SCHEMA_RESOURCES_DTO_MAP.get(DEFAULT_CACHE_DIRECTORY);
}
LOG.info("{} : using the default directory {}",
deviceId, QUALIFIED_DEFAULT_CACHE_DIRECTORY);
import org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup;
/**
- * Master sends this message to the own actor to refresh setup data
+ * Master sends this message to the own actor to refresh setup data.
*/
public class RefreshSetupMasterActorData implements Serializable {
private static final long serialVersionUID = 1L;
private SchemaPathMessage schemaPathMessage;
- public Proxy() {
+ Proxy() {
//due to Externalizable
}
public void writeExternal(final ObjectOutput out) throws IOException {
out.writeInt(Iterables.size(schemaPathMessage.getSchemaPath().getPathTowardsRoot()));
- for (final QName qName : schemaPathMessage.getSchemaPath().getPathTowardsRoot()) {
- out.writeObject(qName);
+ for (final QName qualifiedName : schemaPathMessage.getSchemaPath().getPathTowardsRoot()) {
+ out.writeObject(qualifiedName);
}
out.writeBoolean(schemaPathMessage.getSchemaPath().isAbsolute());
this.schemaPathMessage = schemaPathMessage;
this.normalizedNodeMessage = normalizedNodeMessage;
}
+
private SchemaPathMessage getSchemaPathMessage() {
return schemaPathMessage;
}
private InvokeRpcMessage invokeRpcMessage;
- public Proxy() {
+ Proxy() {
//due to Externalizable
}
private InvokeRpcMessageReply invokeRpcMessageReply;
- public Proxy() {
+ Proxy() {
//due to Externalizable
}
import java.io.Serializable;
/**
- * Message is sended when RPC result does not exist or is empty
+ * Message is sended when RPC result does not exist or is empty.
*/
public class EmptyResultResponse implements Serializable {
private static final long serialVersionUID = 1L;
import java.io.Serializable;
/**
- * Message sent from master back to the slave when submit is not performed, tx is closed
+ * Message sent from master back to the slave when submit is not performed, tx is closed.
*/
public class SubmitFailedReply implements Serializable {
private static final long serialVersionUID = 1L;
@Before
public void setup() {
- initMocks
- (this);
+ initMocks(this);
remoteDeviceId = new RemoteDeviceId("netconf-topology",
new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9999));
final NetconfTopologySetup setup = mock(NetconfTopologySetup.class);
final YangTextSchemaSource yangTextSchemaSource = new YangTextSchemaSource(sourceIdentifier) {
@Override
- protected MoreObjects.ToStringHelper addToStringAttributes(final MoreObjects.ToStringHelper toStringHelper) {
+ protected MoreObjects.ToStringHelper addToStringAttributes(
+ final MoreObjects.ToStringHelper toStringHelper) {
return null;
}
// test if slave get right identifiers from master
- final ProxyDOMRpcService slaveDomRPCService = new ProxyDOMRpcService(system, masterRef, remoteDeviceId, TIMEOUT);
+ final ProxyDOMRpcService slaveDomRPCService =
+ new ProxyDOMRpcService(system, masterRef, remoteDeviceId, TIMEOUT);
final SchemaPath schemaPath = SchemaPath.create(true, QName.create("TestQname"));
final NormalizedNode<?, ?> outputNode = ImmutableContainerNodeBuilder.create()
// InvokeRpcMessageReply message
- doReturn(Futures.immediateCheckedFuture(new DefaultDOMRpcResult(outputNode))).
- when(domRpcService).invokeRpc(any(), any());
+ doReturn(Futures.immediateCheckedFuture(new DefaultDOMRpcResult(outputNode)))
+ .when(domRpcService).invokeRpc(any(), any());
final CheckedFuture<DOMRpcResult, DOMRpcException> resultFutureNn =
slaveDomRPCService.invokeRpc(schemaPath, outputNode);
builder.setNode(node);
- final NetconfDeviceCommunicator communicator = mock (NetconfDeviceCommunicator.class);
+ final NetconfDeviceCommunicator communicator = mock(NetconfDeviceCommunicator.class);
final RemoteDeviceHandler salFacade = mock(RemoteDeviceHandler.class);
final TestingRemoteDeviceConnectorImpl remoteDeviceConnection =
public class ReadTransactionActorTest {
- private static final YangInstanceIdentifier path = YangInstanceIdentifier.EMPTY;
- private static final LogicalDatastoreType store = LogicalDatastoreType.CONFIGURATION;
+ private static final YangInstanceIdentifier PATH = YangInstanceIdentifier.EMPTY;
+ private static final LogicalDatastoreType STORE = LogicalDatastoreType.CONFIGURATION;
@Mock
private DOMDataReadOnlyTransaction deviceReadTx;
final ContainerNode node = Builders.containerBuilder()
.withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(QName.create("cont")))
.build();
- when(deviceReadTx.read(store, path)).thenReturn(Futures.immediateCheckedFuture(Optional.of(node)));
- actorRef.tell(new ReadRequest(store, path), probe.ref());
- verify(deviceReadTx).read(store, path);
+ when(deviceReadTx.read(STORE, PATH)).thenReturn(Futures.immediateCheckedFuture(Optional.of(node)));
+ actorRef.tell(new ReadRequest(STORE, PATH), probe.ref());
+ verify(deviceReadTx).read(STORE, PATH);
probe.expectMsgClass(NormalizedNodeMessage.class);
}
@Test
public void testReadEmpty() throws Exception {
- when(deviceReadTx.read(store, path)).thenReturn(Futures.immediateCheckedFuture(Optional.absent()));
- actorRef.tell(new ReadRequest(store, path), probe.ref());
- verify(deviceReadTx).read(store, path);
+ when(deviceReadTx.read(STORE, PATH)).thenReturn(Futures.immediateCheckedFuture(Optional.absent()));
+ actorRef.tell(new ReadRequest(STORE, PATH), probe.ref());
+ verify(deviceReadTx).read(STORE, PATH);
probe.expectMsgClass(EmptyReadResponse.class);
}
@Test
public void testReadFailure() throws Exception {
final ReadFailedException cause = new ReadFailedException("fail");
- when(deviceReadTx.read(store, path)).thenReturn(Futures.immediateFailedCheckedFuture(cause));
- actorRef.tell(new ReadRequest(store, path), probe.ref());
- verify(deviceReadTx).read(store, path);
+ when(deviceReadTx.read(STORE, PATH)).thenReturn(Futures.immediateFailedCheckedFuture(cause));
+ actorRef.tell(new ReadRequest(STORE, PATH), probe.ref());
+ verify(deviceReadTx).read(STORE, PATH);
probe.expectMsg(cause);
}
@Test
public void testExists() throws Exception {
- when(deviceReadTx.exists(store, path)).thenReturn(Futures.immediateCheckedFuture(true));
- actorRef.tell(new ExistsRequest(store, path), probe.ref());
- verify(deviceReadTx).exists(store, path);
+ when(deviceReadTx.exists(STORE, PATH)).thenReturn(Futures.immediateCheckedFuture(true));
+ actorRef.tell(new ExistsRequest(STORE, PATH), probe.ref());
+ verify(deviceReadTx).exists(STORE, PATH);
probe.expectMsg(true);
}
@Test
public void testExistsFailure() throws Exception {
final ReadFailedException cause = new ReadFailedException("fail");
- when(deviceReadTx.exists(store, path)).thenReturn(Futures.immediateFailedCheckedFuture(cause));
- actorRef.tell(new ExistsRequest(store, path), probe.ref());
- verify(deviceReadTx).exists(store, path);
+ when(deviceReadTx.exists(STORE, PATH)).thenReturn(Futures.immediateFailedCheckedFuture(cause));
+ actorRef.tell(new ExistsRequest(STORE, PATH), probe.ref());
+ verify(deviceReadTx).exists(STORE, PATH);
probe.expectMsg(cause);
}
}
\ No newline at end of file
@Test
public void testSubmitWithOperation() throws Exception {
- final CheckedFuture<Void, TransactionCommitFailedException> resultSubmitTx = Futures.immediateCheckedFuture(null);
+ final CheckedFuture<Void, TransactionCommitFailedException> resultSubmitTx =
+ Futures.immediateCheckedFuture(null);
doReturn(resultSubmitTx).when(readWriteTx).submit();
// With Tx
final DOMDataWriteTransaction wTx = slaveDataBroker.newReadWriteTransaction();
@Test
public void testSubmitWithOperation() throws Exception {
- final CheckedFuture<Void, TransactionCommitFailedException> resultSubmitTx = Futures.immediateCheckedFuture(null);
+ final CheckedFuture<Void, TransactionCommitFailedException> resultSubmitTx =
+ Futures.immediateCheckedFuture(null);
doReturn(resultSubmitTx).when(writeTx).submit();
// With Tx
final DOMDataWriteTransaction wTx = slaveDataBroker.newWriteOnlyTransaction();
assertEquals("nodeId", listPath.firstKeyOf(Node.class).getNodeId().getValue());
assertEquals("topologyId", listPath.firstKeyOf(Topology.class).getTopologyId().getValue());
- assertEquals("topologyId", NetconfTopologyUtils.createTopologyNodePath("topologyId").
- firstKeyOf(Topology.class).getTopologyId().getValue());
+ assertEquals("topologyId", NetconfTopologyUtils.createTopologyNodePath("topologyId")
+ .firstKeyOf(Topology.class).getTopologyId().getValue());
}
}