@Test public void createSubjectName() { List<DnFieldValue> fieldValues = Arrays.asList( new DnFieldValueImpl("O", "foo"), new DnFieldValueImpl("CN", "bar")); assertEquals("O=foo, CN=bar", helper.createSubjectName(fieldValues)); }
public String createSubjectName(List<DnFieldValue> dnFieldValues) { return dnFieldValues.stream() .filter(dnFieldValue -> !StringUtils.isBlank(dnFieldValue.getValue())) .map(dnFieldValue -> dnFieldValue.getId() + "=" + dnFieldValue.getValue()) .collect(Collectors.joining(", ")); }
DnFieldHelper { public String createSubjectName(List<DnFieldValue> dnFieldValues) { return dnFieldValues.stream() .filter(dnFieldValue -> !StringUtils.isBlank(dnFieldValue.getValue())) .map(dnFieldValue -> dnFieldValue.getId() + "=" + dnFieldValue.getValue()) .collect(Collectors.joining(", ")); } }
DnFieldHelper { public String createSubjectName(List<DnFieldValue> dnFieldValues) { return dnFieldValues.stream() .filter(dnFieldValue -> !StringUtils.isBlank(dnFieldValue.getValue())) .map(dnFieldValue -> dnFieldValue.getId() + "=" + dnFieldValue.getValue()) .collect(Collectors.joining(", ")); }  }
DnFieldHelper { public String createSubjectName(List<DnFieldValue> dnFieldValues) { return dnFieldValues.stream() .filter(dnFieldValue -> !StringUtils.isBlank(dnFieldValue.getValue())) .map(dnFieldValue -> dnFieldValue.getId() + "=" + dnFieldValue.getValue()) .collect(Collectors.joining(", ")); }  String createSubjectName(List<DnFieldValue> dnFieldValues); List<DnFieldValue> processDnParameters(CertificateProfileInfo profile, Map<String, String> dnParameters); }
DnFieldHelper { public String createSubjectName(List<DnFieldValue> dnFieldValues) { return dnFieldValues.stream() .filter(dnFieldValue -> !StringUtils.isBlank(dnFieldValue.getValue())) .map(dnFieldValue -> dnFieldValue.getId() + "=" + dnFieldValue.getValue()) .collect(Collectors.joining(", ")); }  String createSubjectName(List<DnFieldValue> dnFieldValues); List<DnFieldValue> processDnParameters(CertificateProfileInfo profile, Map<String, String> dnParameters);  }