@Test(expected = Exception.class) public void testParseFaultyNATBehavior() throws Exception { this.util.parseNATSituations(RESOURCE_PREFIX + RESOURCE_FAULTY_TRAVERSALED_BEHAVIOR); }
public Set<NATSituation> parseNATSituations(final String resourceName) throws Exception { final Set<NATSituation> result = new HashSet<NATSituation>(); final Set<NATSituation> tmp = new HashSet<NATSituation>(); final InputStream resourceAsStream = this.getResourceAsStream(resourceName); final BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream)); String line = ""; while ((line = reader.readLine()) != null) { final String[] lineContent = line.split(VALUE_SEPARATOR); final NATSituation traversaledNATBehavior = this.createNATBehaviorFromValues(lineContent); tmp.add(traversaledNATBehavior); } for (NATSituation natSituation : tmp) { result.addAll(this.resolveWildcards(natSituation)); } return Collections.unmodifiableSet(result); }
NATTraversalTechniqueUtil { public Set<NATSituation> parseNATSituations(final String resourceName) throws Exception { final Set<NATSituation> result = new HashSet<NATSituation>(); final Set<NATSituation> tmp = new HashSet<NATSituation>(); final InputStream resourceAsStream = this.getResourceAsStream(resourceName); final BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream)); String line = ""; while ((line = reader.readLine()) != null) { final String[] lineContent = line.split(VALUE_SEPARATOR); final NATSituation traversaledNATBehavior = this.createNATBehaviorFromValues(lineContent); tmp.add(traversaledNATBehavior); } for (NATSituation natSituation : tmp) { result.addAll(this.resolveWildcards(natSituation)); } return Collections.unmodifiableSet(result); } }
NATTraversalTechniqueUtil { public Set<NATSituation> parseNATSituations(final String resourceName) throws Exception { final Set<NATSituation> result = new HashSet<NATSituation>(); final Set<NATSituation> tmp = new HashSet<NATSituation>(); final InputStream resourceAsStream = this.getResourceAsStream(resourceName); final BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream)); String line = ""; while ((line = reader.readLine()) != null) { final String[] lineContent = line.split(VALUE_SEPARATOR); final NATSituation traversaledNATBehavior = this.createNATBehaviorFromValues(lineContent); tmp.add(traversaledNATBehavior); } for (NATSituation natSituation : tmp) { result.addAll(this.resolveWildcards(natSituation)); } return Collections.unmodifiableSet(result); } private  NATTraversalTechniqueUtil(); }
NATTraversalTechniqueUtil { public Set<NATSituation> parseNATSituations(final String resourceName) throws Exception { final Set<NATSituation> result = new HashSet<NATSituation>(); final Set<NATSituation> tmp = new HashSet<NATSituation>(); final InputStream resourceAsStream = this.getResourceAsStream(resourceName); final BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream)); String line = ""; while ((line = reader.readLine()) != null) { final String[] lineContent = line.split(VALUE_SEPARATOR); final NATSituation traversaledNATBehavior = this.createNATBehaviorFromValues(lineContent); tmp.add(traversaledNATBehavior); } for (NATSituation natSituation : tmp) { result.addAll(this.resolveWildcards(natSituation)); } return Collections.unmodifiableSet(result); } private  NATTraversalTechniqueUtil(); Set<NATSituation> parseNATSituations(final String resourceName); Set<NATSituation> resolveWildcards(final NATSituation withWildcard); Set<NATSituation> getAllPossibleNATSituations(); static NATTraversalTechniqueUtil getInstance(); }
NATTraversalTechniqueUtil { public Set<NATSituation> parseNATSituations(final String resourceName) throws Exception { final Set<NATSituation> result = new HashSet<NATSituation>(); final Set<NATSituation> tmp = new HashSet<NATSituation>(); final InputStream resourceAsStream = this.getResourceAsStream(resourceName); final BufferedReader reader = new BufferedReader(new InputStreamReader(resourceAsStream)); String line = ""; while ((line = reader.readLine()) != null) { final String[] lineContent = line.split(VALUE_SEPARATOR); final NATSituation traversaledNATBehavior = this.createNATBehaviorFromValues(lineContent); tmp.add(traversaledNATBehavior); } for (NATSituation natSituation : tmp) { result.addAll(this.resolveWildcards(natSituation)); } return Collections.unmodifiableSet(result); } private  NATTraversalTechniqueUtil(); Set<NATSituation> parseNATSituations(final String resourceName); Set<NATSituation> resolveWildcards(final NATSituation withWildcard); Set<NATSituation> getAllPossibleNATSituations(); static NATTraversalTechniqueUtil getInstance();  }