@Test // reflection
    public void testConstants_charset() throws Exception {
        for (Field field : getConstantFields(MediaType.class)) {
            final Charset charset = ((MediaType) field.get(null)).charset();
            if (field.getName().endsWith("_UTF_8")) {
                assertThat(charset).isEqualTo(UTF_8);
            } else {
                assertThat(charset).isNull();
            }
        }
    }
Tests for {@link MediaType}.

@author Gregory Kick
core/src/test/java/com/linecorp/armeria/common/MediaTypeTest.java