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