@Test public void creatingATaskTypeFromNullShouldThrow() { Assertions.assertThatThrownBy(() -> TaskType.of(null)).isInstanceOf(IllegalArgumentException.class); }
public static TaskType of(String typeName) { if (typeName == null || typeName.isEmpty()) { throw new IllegalArgumentException("Task type should be defined"); } return new TaskType(typeName); }
TaskType { public static TaskType of(String typeName) { if (typeName == null || typeName.isEmpty()) { throw new IllegalArgumentException("Task type should be defined"); } return new TaskType(typeName); } }
TaskType { public static TaskType of(String typeName) { if (typeName == null || typeName.isEmpty()) { throw new IllegalArgumentException("Task type should be defined"); } return new TaskType(typeName); } private  TaskType(String typeName); }
TaskType { public static TaskType of(String typeName) { if (typeName == null || typeName.isEmpty()) { throw new IllegalArgumentException("Task type should be defined"); } return new TaskType(typeName); } private  TaskType(String typeName); static TaskType of(String typeName); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); }
TaskType { public static TaskType of(String typeName) { if (typeName == null || typeName.isEmpty()) { throw new IllegalArgumentException("Task type should be defined"); } return new TaskType(typeName); } private  TaskType(String typeName); static TaskType of(String typeName); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString();  }