@Test void nullContentTypeShouldReturnNull() { assertThat(ContentTypeCleaner .cleanContentType(null, null)) .isNull(); }
public static String cleanContentType(MimePart mimePart, String contentType) { if (Strings.isNullOrEmpty(contentType)) { return null; } if (REGEX.matcher(contentType).find()) { return contentType; } LOGGER.warn("Can not parse Content-Type: " + contentType); return null; }
ContentTypeCleaner { public static String cleanContentType(MimePart mimePart, String contentType) { if (Strings.isNullOrEmpty(contentType)) { return null; } if (REGEX.matcher(contentType).find()) { return contentType; } LOGGER.warn("Can not parse Content-Type: " + contentType); return null; } }
ContentTypeCleaner { public static String cleanContentType(MimePart mimePart, String contentType) { if (Strings.isNullOrEmpty(contentType)) { return null; } if (REGEX.matcher(contentType).find()) { return contentType; } LOGGER.warn("Can not parse Content-Type: " + contentType); return null; }  }
ContentTypeCleaner { public static String cleanContentType(MimePart mimePart, String contentType) { if (Strings.isNullOrEmpty(contentType)) { return null; } if (REGEX.matcher(contentType).find()) { return contentType; } LOGGER.warn("Can not parse Content-Type: " + contentType); return null; }  static void initialize(); static String cleanContentType(MimePart mimePart, String contentType); }
ContentTypeCleaner { public static String cleanContentType(MimePart mimePart, String contentType) { if (Strings.isNullOrEmpty(contentType)) { return null; } if (REGEX.matcher(contentType).find()) { return contentType; } LOGGER.warn("Can not parse Content-Type: " + contentType); return null; }  static void initialize(); static String cleanContentType(MimePart mimePart, String contentType);  }