Structure style delete input classes with unit tests.
Change-Id: Ic8229310cc3116648a611dae4d4d7c247942d9ee
Signed-off-by: youngsc <296763240@qq.com>
diff --git a/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Objects.java b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Objects.java
new file mode 100644
index 0000000..a418882
--- /dev/null
+++ b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Objects.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import org.onosproject.nemo.model.common.ConnectionId;
+import org.onosproject.nemo.model.common.FlowId;
+import org.onosproject.nemo.model.common.NodeId;
+
+import java.util.List;
+
+/**
+ * Representation of objects.
+ */
+public interface Objects {
+
+ /**
+ * Returns a list of node identifiers.
+ *
+ * @return the list of node IDs
+ */
+ List<NodeId> getNodeIds();
+
+ /**
+ * Returns a list of connection identifiers.
+ *
+ * @return the list of connection IDs
+ */
+ List<ConnectionId> getConnectionIds();
+
+ /**
+ * Returns a list of flow identifiers.
+ *
+ * @return the list of flow IDs
+ */
+ List<FlowId> getFlowIds();
+}
\ No newline at end of file
diff --git a/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilder.java b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilder.java
new file mode 100644
index 0000000..493552f
--- /dev/null
+++ b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilder.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import org.onosproject.nemo.model.common.ConnectionId;
+import org.onosproject.nemo.model.common.FlowId;
+import org.onosproject.nemo.model.common.NodeId;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Representation of objects builder.
+ */
+public class ObjectsBuilder {
+
+ private Map<Class<? extends Objects>, Objects> augmentation = new HashMap<>();
+
+ private List<ConnectionId> connectionIds;
+
+ private List<FlowId> flowIds;
+
+ private List<NodeId> nodeIds;
+
+ /**
+ * Constructs an objects builder.
+ */
+ public ObjectsBuilder() {
+ }
+
+ /**
+ * Constructs an objects builder from objects.
+ *
+ * @param base objects
+ */
+ public ObjectsBuilder(Objects base) {
+ connectionIds = base.getConnectionIds();
+ flowIds = base.getFlowIds();
+ nodeIds = base.getNodeIds();
+ if (base instanceof ObjectsImpl) {
+ ObjectsImpl impl = (ObjectsImpl) base;
+ if (!impl.augmentation.isEmpty()) {
+ this.augmentation = new HashMap<>(impl.augmentation);
+ }
+ }
+ }
+
+ /**
+ * Sets the connection ID list for the builder to use.
+ *
+ * @param value list of connection ID to set
+ * @return self
+ */
+ public ObjectsBuilder connectionIds(List<ConnectionId> value) {
+ connectionIds = value;
+ return this;
+ }
+
+ /**
+ * Sets the flow ID list for the builder to use.
+ *
+ * @param value list of flow ID to set
+ * @return self
+ */
+ public ObjectsBuilder flowIds(List<FlowId> value) {
+ flowIds = value;
+ return this;
+ }
+
+ /**
+ * Sets the node ID list for the builder to use.
+ *
+ * @param value list of node ID to set
+ * @return self
+ */
+ public ObjectsBuilder nodeIds(List<NodeId> value) {
+ nodeIds = value;
+ return this;
+ }
+
+ /**
+ * Adds augmentation by a class type and objects.
+ * If the augmentation is null, remove the augmentation type
+ * key from the hash map.
+ *
+ * @param augmentationType class extends Objects
+ * @param augmentation the objects
+ * @return self
+ */
+ public ObjectsBuilder addAugmentation(
+ Class<? extends Objects> augmentationType, Objects augmentation) {
+ if (augmentation == null) {
+ return removeAugmentation(augmentationType);
+ }
+ this.augmentation.put(augmentationType, augmentation);
+ return this;
+ }
+
+ /**
+ * Removes augmentation with a class type.
+ *
+ * @param augmentationType a class type extends Objects
+ * @return self
+ */
+ public ObjectsBuilder removeAugmentation(
+ Class<? extends Objects> augmentationType) {
+ augmentation.remove(augmentationType);
+ return this;
+ }
+
+ /**
+ * Builds objects.
+ *
+ * @return objects
+ */
+ public Objects build() {
+ return new ObjectsImpl(this);
+ }
+
+ /**
+ * Representation of the implement of Objects.
+ */
+ private static final class ObjectsImpl implements Objects {
+
+ private final List<ConnectionId> connectionIds;
+ private final List<FlowId> flowIds;
+ private final List<NodeId> nodeIds;
+
+ private final Map<Class<? extends Objects>, Objects> augmentation;
+
+ private ObjectsImpl(ObjectsBuilder builder) {
+ connectionIds = new ArrayList<>(builder.connectionIds);
+ flowIds = new ArrayList<>(builder.flowIds);
+ nodeIds = new ArrayList<>(builder.nodeIds);
+ augmentation = new HashMap<>(builder.augmentation);
+ }
+
+ @Override
+ public List<ConnectionId> getConnectionIds() {
+ return new ArrayList<>(connectionIds);
+ }
+
+ @Override
+ public List<FlowId> getFlowIds() {
+ return new ArrayList<>(flowIds);
+ }
+
+ @Override
+ public List<NodeId> getNodeIds() {
+ return new ArrayList<>(nodeIds);
+ }
+
+ @Override
+ public int hashCode() {
+ return java.util.Objects.hash(connectionIds, flowIds, nodeIds, augmentation);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ObjectsImpl o = (ObjectsImpl) obj;
+ return java.util.Objects.equals(connectionIds, o.getConnectionIds()) &&
+ java.util.Objects.equals(flowIds, o.getFlowIds()) &&
+ java.util.Objects.equals(nodeIds, o.getNodeIds()) &&
+ java.util.Objects.equals(augmentation, o.augmentation);
+ }
+
+ @Override
+ public String toString() {
+ return toStringHelper(this)
+ .add("connection", connectionIds)
+ .add("flow", flowIds)
+ .add("node", nodeIds)
+ .add("augmentation", augmentation).toString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Operations.java b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Operations.java
new file mode 100644
index 0000000..6d90a98
--- /dev/null
+++ b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/Operations.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import org.onosproject.nemo.model.common.OperationId;
+
+import java.util.List;
+
+/**
+ * Representation of the operations.
+ */
+public interface Operations {
+
+ /**
+ * Returns a list of operation identifiers.
+ *
+ * @return the list of operation IDs
+ */
+ List<OperationId> getOperationIds();
+}
\ No newline at end of file
diff --git a/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilder.java b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilder.java
new file mode 100644
index 0000000..09a6e68
--- /dev/null
+++ b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilder.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import org.onosproject.nemo.model.common.OperationId;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Representation of operations builder.
+ */
+public class OperationsBuilder {
+
+ private Map<Class<? extends Operations>, Operations> augmentation = new HashMap<>();
+ private List<OperationId> operationIds;
+
+ /**
+ * Constructs an operations builder.
+ */
+ public OperationsBuilder() {
+ }
+
+ /**
+ * Constructs an operations builder from operations.
+ *
+ * @param base operations
+ */
+ public OperationsBuilder(Operations base) {
+ operationIds = base.getOperationIds();
+ if (base instanceof OperationsImpl) {
+ OperationsImpl impl = (OperationsImpl) base;
+ if (!impl.augmentation.isEmpty()) {
+ this.augmentation = new HashMap<>(impl.augmentation);
+ }
+ }
+ }
+
+ /**
+ * Sets the operation ID list for the builder to use.
+ *
+ * @param value list of operation ID to set
+ * @return self
+ */
+ public OperationsBuilder operationIds(List<OperationId> value) {
+ operationIds = value;
+ return this;
+ }
+
+ /**
+ * Adds augmentation by a class type and operations.
+ * If the augmentation is null, remove the augmentation type
+ * key from the hash map.
+ *
+ * @param augmentationType class extends Operations
+ * @param augmentation the operations
+ * @return self
+ */
+ public OperationsBuilder addAugmentation(
+ Class<? extends Operations> augmentationType, Operations augmentation) {
+ if (augmentation == null) {
+ return removeAugmentation(augmentationType);
+ }
+ this.augmentation.put(augmentationType, augmentation);
+ return this;
+ }
+
+ /**
+ * Remove augmentation with a class type.
+ *
+ * @param augmentationType a class type extends Operations
+ * @return self
+ */
+ public OperationsBuilder removeAugmentation(Class<? extends Operations> augmentationType) {
+ augmentation.remove(augmentationType);
+ return this;
+ }
+
+ /**
+ * Builds operations.
+ *
+ * @return operations
+ */
+ public Operations build() {
+ return new OperationsImpl(this);
+ }
+
+ /**
+ * Representation of the implement of Operations.
+ */
+ private static final class OperationsImpl implements Operations {
+
+ private final List<OperationId> operationIds;
+ private final Map<Class<? extends Operations>, Operations> augmentation;
+
+ private OperationsImpl(OperationsBuilder builder) {
+ operationIds = new ArrayList<>(builder.operationIds);
+ augmentation = new HashMap<>(builder.augmentation);
+ }
+
+ @Override
+ public List<OperationId> getOperationIds() {
+ return new ArrayList<>(operationIds);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(operationIds, augmentation);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ OperationsImpl o = (OperationsImpl) obj;
+ return Objects.equals(operationIds, o.getOperationIds()) &&
+ Objects.equals(augmentation, o.augmentation);
+ }
+
+ @Override
+ public String toString() {
+ return toStringHelper(this)
+ .add("operation", operationIds)
+ .add("augmentation", augmentation).toString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/package-info.java b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/package-info.java
new file mode 100644
index 0000000..a2e0ee9
--- /dev/null
+++ b/nemoengine/src/main/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+
+/**
+ * Delete input classes for NEMO model.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
\ No newline at end of file
diff --git a/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilderTest.java b/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilderTest.java
new file mode 100644
index 0000000..7916fb1
--- /dev/null
+++ b/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/ObjectsBuilderTest.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.onosproject.nemo.model.common.ConnectionId;
+import org.onosproject.nemo.model.common.FlowId;
+import org.onosproject.nemo.model.common.NodeId;
+
+import com.google.common.testing.EqualsTester;
+
+/**
+ * Unit tests for {@link ObjectsBuilder}.
+ */
+public class ObjectsBuilderTest {
+
+ private static final String OBJECTS_ERROR_MSG =
+ "objects not set";
+ private static final String ID = "00000000-0000-0000-0000-000000000000";
+ private static final String OTHER_ID = "00000000-0000-0000-0000-000000000001";
+
+ private List<ConnectionId> connectionIdList;
+ private List<ConnectionId> otherConnectionIdList;
+ private List<FlowId> flowIdList;
+ private List<FlowId> otherFlowIdList;
+ private List<NodeId> nodeIdList;
+ private List<NodeId> otherNodeIdList;
+ private Objects objects;
+ private Objects copy;
+ private Objects diff;
+ private ConnectionId connectionID;
+ private ConnectionId otherconnectionID;
+
+ @Test
+ public void buildObjectsWithOperationIDlist() {
+ connectionIdList = new ArrayList<>();
+ flowIdList = new ArrayList<>();
+ nodeIdList = new ArrayList<>();
+ objects = new ObjectsBuilder()
+ .connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ assertEquals(OBJECTS_ERROR_MSG, connectionIdList,
+ objects.getConnectionIds());
+ assertEquals(OBJECTS_ERROR_MSG, flowIdList, objects.getFlowIds());
+ assertEquals(OBJECTS_ERROR_MSG, nodeIdList, objects.getNodeIds());
+ }
+
+ @Test
+ public void fromObjects() {
+ connectionIdList = new ArrayList<>();
+ flowIdList = new ArrayList<>();
+ nodeIdList = new ArrayList<>();
+ objects = new ObjectsBuilder()
+ .connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ copy = new ObjectsBuilder(objects).build();
+ assertEquals(OBJECTS_ERROR_MSG, connectionIdList,
+ copy.getConnectionIds());
+ }
+
+ @Test
+ public void equality() {
+ connectionIdList = new ArrayList<>();
+ flowIdList = new ArrayList<>();
+ nodeIdList = new ArrayList<>();
+ objects = new ObjectsBuilder()
+ .connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ otherConnectionIdList = new ArrayList<>();
+ otherConnectionIdList.add(null);
+ otherFlowIdList = new ArrayList<>();
+ otherFlowIdList.add(null);
+ otherNodeIdList = new ArrayList<>();
+ otherNodeIdList.add(null);
+ copy = new ObjectsBuilder().connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ diff = new ObjectsBuilder().connectionIds(otherConnectionIdList)
+ .flowIds(otherFlowIdList).nodeIds(otherNodeIdList)
+ .build();
+ new EqualsTester()
+ .addEqualityGroup(objects, copy)
+ .addEqualityGroup(diff)
+ .testEquals();
+ }
+
+ @Test
+ public void equalityTwo() {
+ connectionID = new ConnectionId(ID);
+ otherconnectionID = new ConnectionId(OTHER_ID);
+ connectionIdList = new ArrayList<>();
+ connectionIdList.add(connectionID);
+ flowIdList = new ArrayList<>();
+ nodeIdList = new ArrayList<>();
+ objects = new ObjectsBuilder()
+ .connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ otherConnectionIdList = new ArrayList<>();
+ otherConnectionIdList.add(otherconnectionID);
+ copy = new ObjectsBuilder()
+ .connectionIds(connectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ diff = new ObjectsBuilder()
+ .connectionIds(otherConnectionIdList)
+ .flowIds(flowIdList).nodeIds(nodeIdList)
+ .build();
+ new EqualsTester()
+ .addEqualityGroup(objects, copy)
+ .addEqualityGroup(diff)
+ .testEquals();
+ }
+}
\ No newline at end of file
diff --git a/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilderTest.java b/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilderTest.java
new file mode 100644
index 0000000..ceed8c5
--- /dev/null
+++ b/nemoengine/src/test/java/org/onosproject/nemo/model/intent/structure/style/nemo/delete/input/OperationsBuilderTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License 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.
+ */
+package org.onosproject.nemo.model.intent.structure.style.nemo.delete.input;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.onosproject.nemo.model.common.OperationId;
+import com.google.common.testing.EqualsTester;
+
+/**
+ * Unit tests for {@link OperationsBuilder}.
+ */
+public class OperationsBuilderTest {
+
+ private static final String OPERATIONS_ERROR_MSG =
+ "operations not set";
+ private static final String ID = "00000000-0000-0000-0000-000000000000";
+ private static final String OTHER_ID = "00000000-0000-0000-0000-000000000001";
+
+ private List<OperationId> operationIdList;
+ private List<OperationId> otherList;
+ private Operations operations;
+ private Operations copy;
+ private Operations diff;
+ private OperationId operationID;
+ private OperationId otheroperationID;
+
+ @Test
+ public void buildOperationsWithOperationIDlist() {
+ operationIdList = new ArrayList<>();
+ operations = new OperationsBuilder()
+ .operationIds(operationIdList)
+ .build();
+ assertEquals(OPERATIONS_ERROR_MSG, operationIdList,
+ operations.getOperationIds());
+ }
+
+ @Test
+ public void fromOperations() {
+ operationIdList = new ArrayList<>();
+ operations = new OperationsBuilder()
+ .operationIds(operationIdList)
+ .build();
+ copy = new OperationsBuilder(operations).build();
+ assertEquals(OPERATIONS_ERROR_MSG, operationIdList,
+ copy.getOperationIds());
+ }
+
+ @Test
+ public void equality() {
+ operationIdList = new ArrayList<>();
+ operations = new OperationsBuilder().operationIds(operationIdList).build();
+ otherList = new ArrayList<>();
+ otherList.add(null);
+ copy = new OperationsBuilder().operationIds(operationIdList).build();
+ diff = new OperationsBuilder().operationIds(otherList).build();
+ new EqualsTester()
+ .addEqualityGroup(operations, copy)
+ .addEqualityGroup(diff)
+ .testEquals();
+ }
+
+ @Test
+ public void equalityTwo() {
+ operationID = new OperationId(ID);
+ otheroperationID = new OperationId(OTHER_ID);
+ operationIdList = new ArrayList<>();
+ operationIdList.add(operationID);
+ operations = new OperationsBuilder().operationIds(operationIdList).build();
+ otherList = new ArrayList<>();
+ otherList.add(otheroperationID);
+ copy = new OperationsBuilder().operationIds(operationIdList).build();
+ diff = new OperationsBuilder().operationIds(otherList).build();
+ new EqualsTester()
+ .addEqualityGroup(operations, copy)
+ .addEqualityGroup(diff)
+ .testEquals();
+ }
+}
\ No newline at end of file