ActionableEventFactory { @NotNull public static EvidenceDirection directionFromFileValue(@NotNull String directionFileValue) { EvidenceDirection direction = EvidenceDirection.fromDisplayString(directionFileValue); if (direction == null) { throw new IllegalStateException("Cannot resolve direction: " + directionFileValue); } return direction; } private  ActionableEventFactory(); @NotNull static Source sourceFromFileValue(@NotNull String sourceFileValue); @NotNull static EvidenceDirection directionFromFileValue(@NotNull String directionFileValue);  }
@Test (expected = IllegalStateException.class) public void exceptionOnInvalidDirectionFileValue() { ActionableEventFactory.directionFromFileValue("Whatever"); }