NetworkMetadata { public final void setNetworkInterfaces(List<NetworkInterface> networkInterfaces) { this.networkInterfaces = networkInterfaces; }  final List<NetworkInterface> getNetworkInterfaces(); final void setNetworkInterfaces(List<NetworkInterface> networkInterfaces); @Override int hashCode(); @Override boolean equals(@Nullable Object obj); @Override String toString();  }
@Test public void testCommonMethods() { NetworkMetadata.AccessConfiguration access1 = new NetworkMetadata.AccessConfiguration(); access1.setType("type"); access1.setExternalIp("10.0.0.8"); NetworkMetadata.AccessConfiguration access2 = new NetworkMetadata.AccessConfiguration(); access2.setType("type"); access2.setExternalIp("10.0.0.8"); NetworkMetadata.AccessConfiguration access3 = new NetworkMetadata.AccessConfiguration(); access3.setType("type-diff"); access3.setExternalIp("10.0.0.8"); TestUtil.testCommonMethods(access1, access2, access3); NetworkMetadata.NetworkInterface interf1 = new NetworkMetadata.NetworkInterface(); interf1.setIp("10.0.0.9"); interf1.setNetwork("abcde"); interf1.setAccessConfiguration(ImmutableList.of(access1)); NetworkMetadata.NetworkInterface interf2 = new NetworkMetadata.NetworkInterface(); interf2.setIp("10.0.0.9"); interf2.setNetwork("abcde"); interf2.setAccessConfiguration(ImmutableList.of(access2)); NetworkMetadata.NetworkInterface interf3 = new NetworkMetadata.NetworkInterface(); interf3.setIp("10.0.0.9"); interf3.setNetwork("abcde-diff"); interf3.setAccessConfiguration(ImmutableList.of(access3)); TestUtil.testCommonMethods(interf1, interf2, interf3); NetworkMetadata network1 = new NetworkMetadata(); network1.setNetworkInterfaces(ImmutableList.of(interf1)); NetworkMetadata network2 = new NetworkMetadata(); network2.setNetworkInterfaces(ImmutableList.of(interf2)); NetworkMetadata network3 = new NetworkMetadata(); network3.setNetworkInterfaces(ImmutableList.of(interf3)); TestUtil.testCommonMethods(network1, network2, network3); }