class HeadersSerializer implements Serializer<Headers> {

    @Override
    public String serialize(final Headers headers) {
        Set<String> names = headers.keySet();
        StringBuilder sb = new StringBuilder();
        for (String name : names) {
            sb.append(name)
                    .append(KEY_VALUE_SEPARATOR)
                    .append(headers.getHeader(name))
                    .append(NEW_LINE);
        }
        sb.append(NEW_LINE);

        return sb.toString();
    }

}