@Test
public void should_extract_charset() throws Exception {

    assertThat(HTTP.charsetFromContentType("text/html; charset=UTF-8")).isEqualTo(Optional.of("UTF-8"));
    assertThat(HTTP.charsetFromContentType("application/json; charset=ISO-8859-1")).isEqualTo(Optional.of("ISO-8859-1"));
    assertThat(HTTP.charsetFromContentType("application/json")).isEqualTo(Optional.<String>absent());
}