Executable implements Option { public static Executable named(String name) { return new Executable(name); } private  Executable(String name); String getName(); static Executable named(String name); @Override boolean equals(Object o); @Override int hashCode();  }
@Test(expected = IllegalArgumentException.class) public void shouldNotAllowNullExecutableName() { Executable executable = Executable.named(null); }