@SuppressWarnings("Guava")
    static <T, R> FluentIterable<Field> getConstantFields(Class<T> clazz, Class<R>... filterClazz) {
        return FluentIterable.from(asList(clazz.getDeclaredFields())).filter(input -> {
            final int modifiers = input.getModifiers();
            return isPublic(modifiers) &&
                   isStatic(modifiers) &&
                   isFinal(modifiers) &&
                   filterClazz.length == 1 ?
                   filterClazz[0].equals(input.getType()) : clazz.equals(input.getType());
        });
    }
Tests for {@link MediaType}.

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