From 49ae7927cb3137ed8ae645278082d03c83ffd940 Mon Sep 17 00:00:00 2001 From: highstreetherbert Date: Fri, 10 Jul 2020 17:47:11 +0200 Subject: Reformat sdnr netconfnode-state-service to ONAP code style Reformat to ONAP code style Issue-ID: SDNC-1276 Signed-off-by: highstreetherbert Change-Id: Ib7faecb419770d8ffb4b25d5d34446a2cd71fc7f Signed-off-by: highstreetherbert --- .../test/TestAkkaConfig.java | 8 +++---- .../test/TestGeoConfig.java | 4 ++-- .../test/TestNetconfNodeStateService.java | 27 +++++++++++----------- .../mock/ClusterSingletonServiceProviderMock.java | 18 +++++++-------- .../test/mock/DataBrokerMountpointMock.java | 4 ++-- .../test/mock/DataBrokerNetconfMock.java | 9 ++++---- .../test/mock/MountPointMock.java | 11 +++++---- .../test/mock/MountPointServiceMock.java | 4 ++-- .../test/mock/NotificationPublishServiceMock.java | 9 ++++---- .../test/mock/RpcConsumerRegistryMock.java | 4 ++-- .../test/mock/RpcProviderRegistryMock.java | 4 ++-- 11 files changed, 51 insertions(+), 51 deletions(-) (limited to 'sdnr/wt/netconfnode-state-service/provider/src/test') diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java index dd317c781..a420b5e91 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.junit.Assert.fail; @@ -108,7 +108,7 @@ public class TestAkkaConfig { String failMessage = "failed: " + e.getMessage(); System.out.println(failMessage); fail(failMessage); - } + } } @Test @@ -123,7 +123,7 @@ public class TestAkkaConfig { System.out.println("testing clusternode config1"); System.out.println("==========================="); cfg = AkkaConfig.load(file.getAbsolutePath()); - System.out.println("succeeded: "+cfg.hashCode()); + System.out.println("succeeded: " + cfg.hashCode()); System.out.println(cfg.toString()); System.out.println(String.format("found %d cluster nodes", cfg.getClusterConfig().getSeedNodes().size())); for (ClusterNodeInfo n : cfg.getClusterConfig().getSeedNodes()) { diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java index 915c88d50..327a87d2b 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java index 5427c0339..eb07a48f1 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= ONAP : ccsdk * feature sdnr wt ================================================================================ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. @@ -12,7 +12,7 @@ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.mockito.Mockito.mock; @@ -149,8 +149,7 @@ public class TestNetconfNodeStateService { System.out.println("Test2: Register state listener"); NetconfNodeStateListener nSL = mock(NetconfNodeStateListener.class); - ListenerRegistration res = - netconfStateService.registerNetconfNodeStateListener(nSL); + ListenerRegistration res = netconfStateService.registerNetconfNodeStateListener(nSL); assertNotNull("Result should be null", res); res.getInstance(); res.close(); @@ -163,7 +162,7 @@ public class TestNetconfNodeStateService { NetconfNodeConnectListener nCL = mock(NetconfNodeConnectListener.class); ListenerRegistration res = - netconfStateService.registerNetconfNodeConnectListener(nCL); + netconfStateService.registerNetconfNodeConnectListener(nCL); assertNotNull("Result should be null", res); res.getInstance(); res.close(); @@ -212,7 +211,7 @@ public class TestNetconfNodeStateService { //verify that it was called one time and nodeId is the expected ArgumentCaptor varArgs = ArgumentCaptor.forClass(NetconfAccessor.class); verify(nCL).onEnterConnected(varArgs.capture()); - System.out.println("Accessor "+varArgs.getValue().getNodeId()); + System.out.println("Accessor " + varArgs.getValue().getNodeId()); assertEquals(nodeIdString, varArgs.getValue().getNodeId().getValue()); } @@ -252,7 +251,7 @@ public class TestNetconfNodeStateService { ListenableFuture> statusOutput = api.getStatus(statusInput.build()); RpcResult res = statusOutput.get(); GetStatusOutput output = res.getResult(); - System.out.println("Output "+output); + System.out.println("Output " + output); } @@ -269,15 +268,16 @@ public class TestNetconfNodeStateService { FaultNotification fault = faultBuilder.build(); PushFaultNotificationInputBuilder statusInput = new PushFaultNotificationInputBuilder(); statusInput.fieldsFrom(fault); - ListenableFuture> rpcOutput = api.pushFaultNotification(statusInput.build()); + ListenableFuture> rpcOutput = + api.pushFaultNotification(statusInput.build()); RpcResult res = rpcOutput.get(); PushFaultNotificationOutput output = res.getResult(); //verify that it was called one time - verify(vNL,times(1)).onNotification(fault); + verify(vNL, times(1)).onNotification(fault); registration.close(); - System.out.println("Output "+output); + System.out.println("Output " + output); } @Test @@ -293,15 +293,16 @@ public class TestNetconfNodeStateService { AttributeChangeNotification change = changeBuilder.build(); PushAttributeChangeNotificationInputBuilder statusInput = new PushAttributeChangeNotificationInputBuilder(); statusInput.fieldsFrom(change); - ListenableFuture> rpcOutput = api.pushAttributeChangeNotification(statusInput.build()); + ListenableFuture> rpcOutput = + api.pushAttributeChangeNotification(statusInput.build()); RpcResult res = rpcOutput.get(); PushAttributeChangeNotificationOutput output = res.getResult(); //verify that it was called one time - verify(vNL,times(1)).onNotification(change); + verify(vNL, times(1)).onNotification(change); registration.close(); - System.out.println("Output "+output); + System.out.println("Output " + output); } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java index 86340c052..cc502b4aa 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; @@ -24,14 +24,14 @@ import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegist public class ClusterSingletonServiceProviderMock implements ClusterSingletonServiceProvider { - @Override - public void close() throws Exception { + @Override + public void close() throws Exception { - } + } - @Override - public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) { - return null; - } + @Override + public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) { + return null; + } } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java index 48401c881..ebcf5fb40 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java index 90ab8608c..7db577cc8 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Collection; @@ -64,7 +64,7 @@ public class DataBrokerNetconfMock implements DataBroker { @Override public > @NonNull ListenerRegistration registerDataTreeChangeListener( @NonNull DataTreeIdentifier treeId, @NonNull L pListener) { - System.out.println("Register "+pListener.getClass().getName()); + System.out.println("Register " + pListener.getClass().getName()); if (pListener instanceof ClusteredDataTreeChangeListener) { System.out.println("Clustered listener"); this.listenerClustered = (ClusteredDataTreeChangeListener) pListener; @@ -80,8 +80,7 @@ public class DataBrokerNetconfMock implements DataBroker { } @Override - public void close() { - } + public void close() {} }; } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java index e5bff451d..77d5e5e38 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; @@ -57,12 +57,13 @@ public class MountPointMock implements MountPoint { @Override public Optional getService(Class service) { - System.out.println("Requested mountpoint service: "+service.getSimpleName()+" databrokerAbsent state: "+databrokerAbsent); + System.out.println("Requested mountpoint service: " + service.getSimpleName() + " databrokerAbsent state: " + + databrokerAbsent); Optional res; if (service.isInstance(dataBroker)) { System.out.println("Delivering databroker"); - res = databrokerAbsent ? Optional.empty() : Optional.of(dataBroker); + res = databrokerAbsent ? Optional.empty() : Optional.of(dataBroker); } else if (service.isInstance(rpcConsumerRegistry)) { System.out.println("Delivering RpcConsumerRegistryMock"); res = Optional.of(rpcConsumerRegistry); @@ -76,7 +77,7 @@ public class MountPointMock implements MountPoint { return (Optional) res; } - public void setDatabrokerAbsent( boolean state) { + public void setDatabrokerAbsent(boolean state) { this.databrokerAbsent = state; } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java index 127019633..996549e3d 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Optional; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java index 0564c56a3..2b3e00f5c 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import com.google.common.util.concurrent.ListenableFuture; @@ -32,14 +32,13 @@ public class NotificationPublishServiceMock implements NotificationPublishServic return null; } - @Override + @Override public ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) throws InterruptedException { return null; } @Override - public void putNotification(Notification notification) throws InterruptedException { - } + public void putNotification(Notification notification) throws InterruptedException {} } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java index 7e48ff2e5..8eea79abc 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java index fbcb21db9..f2f6c0e68 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Set; -- cgit 1.2.3-korg