### Question:
CharacterEncodings { public static boolean includes(CharacterEncoding ce1, CharacterEncoding ce2) { if(ce1==null || ce2==null) { return false; } if(ce1.isWildcard()) { return true; } if(ce2.isWildcard()) { return false; } return ce1.charset().equals(ce2.charset()); } private  CharacterEncodings(); static CharacterEncoding wildcard(); static CharacterEncoding of(Charset charset); static CharacterEncoding fromString(final String name); static boolean includes(CharacterEncoding ce1, CharacterEncoding ce2);  }### Answer:
@Test public void nullDoesNotIncludeAnything(@Mocked final CharacterEncoding encoding) throws Exception { assertThat(CharacterEncodings.includes(null,encoding),equalTo(false)); }
@Test public void nothingIncludesNull(@Mocked final CharacterEncoding encoding) throws Exception { assertThat(CharacterEncodings.includes(encoding,null),equalTo(false)); }
@Test public void aRegularCharacterEncodingsIncludesAnotherIffTheyHaveTheSameCharset() throws Exception { assertThat(CharacterEncodings.includes(UTF_8,UTF_8),equalTo(true)); }
@Test public void aRegularCharacterEncodingsDoesNotIncludeAnotherIffTheyHaveTheDifferentCharset() throws Exception { assertThat(CharacterEncodings.includes(UTF_8,US_ASCII),equalTo(false)); }