@Test void ofShouldThrowWhenEmpty() { assertThatThrownBy(() -> TaskRegistrationKey.of("")) .isInstanceOf(IllegalArgumentException.class); }
public static TaskRegistrationKey of(String value) { Preconditions.checkNotNull(value, "TaskRegistrationKey cannot be null"); Preconditions.checkArgument(!value.isEmpty(), "TaskRegistrationKey cannot be empty"); return new TaskRegistrationKey(value); }
TaskRegistrationKey { public static TaskRegistrationKey of(String value) { Preconditions.checkNotNull(value, "TaskRegistrationKey cannot be null"); Preconditions.checkArgument(!value.isEmpty(), "TaskRegistrationKey cannot be empty"); return new TaskRegistrationKey(value); } }
TaskRegistrationKey { public static TaskRegistrationKey of(String value) { Preconditions.checkNotNull(value, "TaskRegistrationKey cannot be null"); Preconditions.checkArgument(!value.isEmpty(), "TaskRegistrationKey cannot be empty"); return new TaskRegistrationKey(value); } private  TaskRegistrationKey(String value); }
TaskRegistrationKey { public static TaskRegistrationKey of(String value) { Preconditions.checkNotNull(value, "TaskRegistrationKey cannot be null"); Preconditions.checkArgument(!value.isEmpty(), "TaskRegistrationKey cannot be empty"); return new TaskRegistrationKey(value); } private  TaskRegistrationKey(String value); static TaskRegistrationKey of(String value); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); }
TaskRegistrationKey { public static TaskRegistrationKey of(String value) { Preconditions.checkNotNull(value, "TaskRegistrationKey cannot be null"); Preconditions.checkArgument(!value.isEmpty(), "TaskRegistrationKey cannot be empty"); return new TaskRegistrationKey(value); } private  TaskRegistrationKey(String value); static TaskRegistrationKey of(String value); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString();  }