ActionableEvidenceFactory { @Nullable @VisibleForTesting static String reformatField(@Nullable String direction) { if (direction == null) { return null; } else if (direction.length() < 2) { return direction.toUpperCase(); } else { return direction.substring(0, 1).toUpperCase() + direction.substring(1).toLowerCase(); } } private  ActionableEvidenceFactory(); @Nullable static ActionableEvent toActionableEvent(@NotNull ViccEntry entry);  }
@Test public void canReformatField() { assertEquals("Field", ActionableEvidenceFactory.reformatField("Field")); assertEquals("Field", ActionableEvidenceFactory.reformatField("field")); assertEquals("Field", ActionableEvidenceFactory.reformatField("FIELD")); assertEquals("F", ActionableEvidenceFactory.reformatField("F")); assertEquals("F", ActionableEvidenceFactory.reformatField("f")); assertEquals("", ActionableEvidenceFactory.reformatField("")); assertNull(ActionableEvidenceFactory.reformatField(null)); }