@Test public void testGetAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> expectedResult = new ArrayList<NATTraversalTechnique>(); expectedResult.add(new NATTraversalTechniqueMock("DirectConnection", 3, true)); expectedResult.add(new NATTraversalTechniqueMock("Reversal", 3, true)); expectedResult.add(new NATTraversalTechniqueMock("HolePunching", 3, true)); expectedResult.add(new NATTraversalTechniqueMock("Relaying", 7, false)); final List<NATTraversalTechnique> actualResult = this.registry.getAllSupportedNATTraversalTechniques(); assertTrue(this.containsAll(expectedResult, actualResult)); }
@Override public List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> result = new ArrayList<NATTraversalTechnique>(); final Iterator<NATTraversalTechnique> iterator = this.pluginLoader.getPluginIterator(); while (iterator.hasNext()) { result.add(iterator.next().copy()); } return Collections.unmodifiableList(result); }
NATTraversalRegistryImpl implements NATTraversalRegistry { @Override public List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> result = new ArrayList<NATTraversalTechnique>(); final Iterator<NATTraversalTechnique> iterator = this.pluginLoader.getPluginIterator(); while (iterator.hasNext()) { result.add(iterator.next().copy()); } return Collections.unmodifiableList(result); } }
NATTraversalRegistryImpl implements NATTraversalRegistry { @Override public List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> result = new ArrayList<NATTraversalTechnique>(); final Iterator<NATTraversalTechnique> iterator = this.pluginLoader.getPluginIterator(); while (iterator.hasNext()) { result.add(iterator.next().copy()); } return Collections.unmodifiableList(result); } private  NATTraversalRegistryImpl(); }
NATTraversalRegistryImpl implements NATTraversalRegistry { @Override public List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> result = new ArrayList<NATTraversalTechnique>(); final Iterator<NATTraversalTechnique> iterator = this.pluginLoader.getPluginIterator(); while (iterator.hasNext()) { result.add(iterator.next().copy()); } return Collections.unmodifiableList(result); } private  NATTraversalRegistryImpl(); @Override List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques(); @Override NATTraversalTechnique getNATTraversalTechniqueByName(final String name); @Override Set<NATTraversalRule> getRulesForDecisionTreeLearning(); @Override List<NATTraversalTechnique> getAllFallbackTechniques(); @Override NATTraversalTechnique getNATTraversalTechniqueByEncoding(final int encoding); static NATTraversalRegistry getInstance(); }
NATTraversalRegistryImpl implements NATTraversalRegistry { @Override public List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques() { final List<NATTraversalTechnique> result = new ArrayList<NATTraversalTechnique>(); final Iterator<NATTraversalTechnique> iterator = this.pluginLoader.getPluginIterator(); while (iterator.hasNext()) { result.add(iterator.next().copy()); } return Collections.unmodifiableList(result); } private  NATTraversalRegistryImpl(); @Override List<NATTraversalTechnique> getAllSupportedNATTraversalTechniques(); @Override NATTraversalTechnique getNATTraversalTechniqueByName(final String name); @Override Set<NATTraversalRule> getRulesForDecisionTreeLearning(); @Override List<NATTraversalTechnique> getAllFallbackTechniques(); @Override NATTraversalTechnique getNATTraversalTechniqueByEncoding(final int encoding); static NATTraversalRegistry getInstance();  }