@Test public void testModifyVirtualLinkBandwidth() throws Exception { List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks = new ArrayList<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink>(); VirtualLinkId virtualLinkId = mock(VirtualLinkId.class); org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink = mock(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink.class); long bandwidth = 1L; virtualLinks.add(virtualLink); when(virtualLink.getLinkId()) .thenReturn(mock(VirtualLinkId.class)) .thenReturn(virtualLinkId); ActionResolverUtils.modifyVirtualLinkBandwidth(virtualLinks, virtualLinkId, bandwidth); ActionResolverUtils.modifyVirtualLinkBandwidth(virtualLinks,virtualLinkId,bandwidth); verify(virtualLink, times(4)).getLinkId(); }
protected static void modifyVirtualLinkBandwidth( List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks, VirtualLinkId virtualLinkId, long bandwidth) { int i = 0; for ( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink : virtualLinks ) { if ( virtualLink.getLinkId().equals(virtualLinkId) ) { org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLinkBuilder(virtualLink) .setBandwidth(bandwidth) .build(); virtualLinks.set(i, virtualLink1); return; } i++; } return; }
ActionResolverUtils { protected static void modifyVirtualLinkBandwidth( List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks, VirtualLinkId virtualLinkId, long bandwidth) { int i = 0; for ( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink : virtualLinks ) { if ( virtualLink.getLinkId().equals(virtualLinkId) ) { org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLinkBuilder(virtualLink) .setBandwidth(bandwidth) .build(); virtualLinks.set(i, virtualLink1); return; } i++; } return; } }
ActionResolverUtils { protected static void modifyVirtualLinkBandwidth( List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks, VirtualLinkId virtualLinkId, long bandwidth) { int i = 0; for ( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink : virtualLinks ) { if ( virtualLink.getLinkId().equals(virtualLinkId) ) { org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLinkBuilder(virtualLink) .setBandwidth(bandwidth) .build(); virtualLinks.set(i, virtualLink1); return; } i++; } return; }  }
ActionResolverUtils { protected static void modifyVirtualLinkBandwidth( List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks, VirtualLinkId virtualLinkId, long bandwidth) { int i = 0; for ( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink : virtualLinks ) { if ( virtualLink.getLinkId().equals(virtualLinkId) ) { org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLinkBuilder(virtualLink) .setBandwidth(bandwidth) .build(); virtualLinks.set(i, virtualLink1); return; } i++; } return; }   }
ActionResolverUtils { protected static void modifyVirtualLinkBandwidth( List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink> virtualLinks, VirtualLinkId virtualLinkId, long bandwidth) { int i = 0; for ( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink : virtualLinks ) { if ( virtualLink.getLinkId().equals(virtualLinkId) ) { org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLink virtualLink1 = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.generic.virtual.network.rev151010.virtual.networks.virtual.network.virtual.links.VirtualLinkBuilder(virtualLink) .setBandwidth(bandwidth) .build(); virtualLinks.set(i, virtualLink1); return; } i++; } return; }    }