ActionableEvidenceFactory { @Nullable @VisibleForTesting static String reformatDrugLabels(@Nullable String drugLabels) { if (drugLabels == null) { return null; } String drugSeparator = ","; String[] parts = drugLabels.split(drugSeparator); StringJoiner joiner = new StringJoiner(drugSeparator); for (String part : parts) { joiner.add(reformatField(part)); } return joiner.toString(); } private  ActionableEvidenceFactory(); @Nullable static ActionableEvent toActionableEvent(@NotNull ViccEntry entry);  }
@Test public void canReformatDrugs() { assertEquals("Imatinib,Imatinib", ActionableEvidenceFactory.reformatDrugLabels("IMATINIB,IMATINIB")); assertNull(ActionableEvidenceFactory.reformatDrugLabels(null)); }