ActionableEvidenceFactory { @Nullable @VisibleForTesting static String extractDoid(@Nullable String doidString) { if (doidString == null) { return null; } String[] parts = doidString.split(":"); if (parts.length == 2) { if (parts[0].equalsIgnoreCase("doid")) { return parts[1]; } else { return Strings.EMPTY; } } else { LOGGER.warn("Unexpected DOID string: '{}'", doidString); return Strings.EMPTY; } } private  ActionableEvidenceFactory(); @Nullable static ActionableEvent toActionableEvent(@NotNull ViccEntry entry);  }
@Test public void canExtractDoid() { assertEquals("123", ActionableEvidenceFactory.extractDoid("DOID:123")); assertEquals(Strings.EMPTY, ActionableEvidenceFactory.extractDoid("SNOMED:123")); assertEquals(Strings.EMPTY, ActionableEvidenceFactory.extractDoid("DOID")); assertNull(ActionableEvidenceFactory.extractDoid(null)); }