@Test void mimeTypeOfShouldThrowWhenEmpty() { assertThatThrownBy(() -> ContentType.of("")) .isInstanceOf(IllegalArgumentException.class); }
public static ContentType of(String value) { Preconditions.checkArgument(!Strings.isNullOrEmpty(value), "'content type' is mandatory"); return new ContentType(value); }
ContentType { public static ContentType of(String value) { Preconditions.checkArgument(!Strings.isNullOrEmpty(value), "'content type' is mandatory"); return new ContentType(value); } }
ContentType { public static ContentType of(String value) { Preconditions.checkArgument(!Strings.isNullOrEmpty(value), "'content type' is mandatory"); return new ContentType(value); } ContentType(String value); }
ContentType { public static ContentType of(String value) { Preconditions.checkArgument(!Strings.isNullOrEmpty(value), "'content type' is mandatory"); return new ContentType(value); } ContentType(String value); static ContentType of(String value); static ContentType of(MimeType mimeType); static ContentType of(MimeType mimeType, Optional<Charset> charset); ContentTypeField asMime4J(); MimeType mimeType(); MediaType mediaType(); SubType subType(); Optional<Charset> charset(); String asString(); @Override final boolean equals(Object o); @Override final int hashCode(); }
ContentType { public static ContentType of(String value) { Preconditions.checkArgument(!Strings.isNullOrEmpty(value), "'content type' is mandatory"); return new ContentType(value); } ContentType(String value); static ContentType of(String value); static ContentType of(MimeType mimeType); static ContentType of(MimeType mimeType, Optional<Charset> charset); ContentTypeField asMime4J(); MimeType mimeType(); MediaType mediaType(); SubType subType(); Optional<Charset> charset(); String asString(); @Override final boolean equals(Object o); @Override final int hashCode();  }