@Test void createShouldThrowOnNullIdentifier() { assertThatThrownBy(() -> AccountId.fromString(null)) .isInstanceOf(IllegalArgumentException.class); }
public static AccountId fromString(String identifier) { Preconditions.checkArgument(!Strings.isNullOrEmpty(identifier), "AccountId identifier should not be null or empty"); return new AccountId(identifier); }
AccountId { public static AccountId fromString(String identifier) { Preconditions.checkArgument(!Strings.isNullOrEmpty(identifier), "AccountId identifier should not be null or empty"); return new AccountId(identifier); } }
AccountId { public static AccountId fromString(String identifier) { Preconditions.checkArgument(!Strings.isNullOrEmpty(identifier), "AccountId identifier should not be null or empty"); return new AccountId(identifier); } private  AccountId(String identifier); }
AccountId { public static AccountId fromString(String identifier) { Preconditions.checkArgument(!Strings.isNullOrEmpty(identifier), "AccountId identifier should not be null or empty"); return new AccountId(identifier); } private  AccountId(String identifier); static AccountId fromString(String identifier); static AccountId fromUsername(Username username); String getIdentifier(); @Override boolean equals(Object o); @Override int hashCode(); }
AccountId { public static AccountId fromString(String identifier) { Preconditions.checkArgument(!Strings.isNullOrEmpty(identifier), "AccountId identifier should not be null or empty"); return new AccountId(identifier); } private  AccountId(String identifier); static AccountId fromString(String identifier); static AccountId fromUsername(Username username); String getIdentifier(); @Override boolean equals(Object o); @Override int hashCode();  }