@Test
public void valueOfShouldThrowExceptionIfEmpty() {

    Throwable thrown = catchThrowable(() -> {
        MediaType.valueOf("");
    });
    assertThat(thrown).isInstanceOf(IllegalArgumentException.class);
}