gzhao9 commented on code in PR #8137:
URL: https://github.com/apache/cloudstack/pull/8137#discussion_r1379324087


##########
plugins/network-elements/juniper-contrail/src/test/java/org/apache/cloudstack/network/contrail/model/InstanceIpModelTest.java:
##########
@@ -56,14 +56,7 @@ public void testCreateInstanceIp() throws IOException {
         when(controller.getManager()).thenReturn(contrailMgr);
 
         // Create Virtual-Network (VN)
-        NetworkVO network = mock(NetworkVO.class);
-        when(network.getName()).thenReturn("testnetwork");
-        when(network.getState()).thenReturn(Network.State.Implemented);
-        when(network.getGateway()).thenReturn("10.1.1.1");
-        when(network.getCidr()).thenReturn("10.1.1.0/24");
-        when(network.getPhysicalNetworkId()).thenReturn(42L);
-        when(network.getDomainId()).thenReturn(10L);
-        when(network.getAccountId()).thenReturn(42L);
+        NetworkVO network =  new 
MockNetworkVO(Network.State.Implemented).getNetwork();

Review Comment:
   Thanks for the advice, I used the first method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to