import static com.vtence.molecule.http.HeaderNames.CONTENT_LANGUAGE;
import static java.util.stream.Collectors.toList;
public class ContentLanguage {
private final List<Locale> locales = new ArrayList<>();
public static ContentLanguage of(Response response) {
<BUG>return ContentLanguage.parse(response.header(CONTENT_LANGUAGE));
}</BUG>
public static ContentLanguage parse(String header) {
<BUG>return header != null ? from(new Header(header)) : from(new Header(""));
}</BUG>
public static ContentLanguage from(Header header) {

import static com.vtence.molecule.http.HeaderNames.CONTENT_LANGUAGE;
import static java.util.stream.Collectors.toList;
public class ContentLanguage {
private final List<Locale> locales = new ArrayList<>();
public static ContentLanguage of(Response response) {
String header = response.header(CONTENT_LANGUAGE);
return header != null ? ContentLanguage.parse(header) : null;
}
public static ContentLanguage parse(String header) {
return from(new Header(header));
}
public static ContentLanguage from(Header header) {
