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