@Test public void fromString() { AssociationList list = tested.fromString(VALUE); assertEquals(2, list.getInputs().size()); assertEquals(2, list.getOutputs().size()); }
public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList()))) .orElse(new AssociationList()); }
AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList()))) .orElse(new AssociationList()); } }
AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList()))) .orElse(new AssociationList()); } AssociationList(List<AssociationDeclaration> inputs, List<AssociationDeclaration> outputs);  AssociationList(List<AssociationDeclaration> all);  AssociationList(); }
AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList()))) .orElse(new AssociationList()); } AssociationList(List<AssociationDeclaration> inputs, List<AssociationDeclaration> outputs);  AssociationList(List<AssociationDeclaration> all);  AssociationList(); static AssociationList fromString(String encoded); List<AssociationDeclaration> getInputs(); AssociationDeclaration lookupInput(String id); List<AssociationDeclaration> lookupOutputs(String id); List<AssociationDeclaration> getOutputs(); @Override String toString(); }
AssociationList { public static AssociationList fromString(String encoded) { return Optional.ofNullable(encoded) .filter(StringUtils::nonEmpty) .map(s -> new AssociationList( Arrays.stream(s.replaceAll(REGEX_DELIMITER, REPLACE_DELIMITER_AVOID_CONFLICTS) .split(REPLACED_DELIMITER)) .map(AssociationDeclaration::fromString) .collect(toList()))) .orElse(new AssociationList()); } AssociationList(List<AssociationDeclaration> inputs, List<AssociationDeclaration> outputs);  AssociationList(List<AssociationDeclaration> all);  AssociationList(); static AssociationList fromString(String encoded); List<AssociationDeclaration> getInputs(); AssociationDeclaration lookupInput(String id); List<AssociationDeclaration> lookupOutputs(String id); List<AssociationDeclaration> getOutputs(); @Override String toString(); static final String REGEX_DELIMITER; static final String RANDOM_DELIMITER; static final String REPLACE_DELIMITER_AVOID_CONFLICTS; static final String REPLACED_DELIMITER; }