DefaultEntityType implements EntityType { public static DefaultEntityType of(final CharSequence value) { return new DefaultEntityType(argumentNotEmpty(value, "value")); } private  DefaultEntityType(final CharSequence value); static DefaultEntityType of(final CharSequence value); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override int compareTo(final EntityType o); @Override int length(); @Override char charAt(final int index); @Override CharSequence subSequence(final int start, final int end); @Override String toString();  }
@Test public void tryToGetInstanceWithNullValue() { assertThatNullPointerException() .isThrownBy(() -> DefaultEntityType.of(null)) .withMessage("The value must not be null!") .withNoCause(); }
@Test public void tryToGetInstanceWithEmptyValue() { assertThatIllegalArgumentException() .isThrownBy(() -> DefaultEntityType.of("")) .withMessage("The argument 'value' must not be empty!") .withNoCause(); }