def build_class(names):
    """ Format ZLabels class file.

    >>> names = ['Label.AColleague', 'Label.ZipPostalCode']
    >>> output = build_class(names)
    >>> print output
    @isTest
    private class ZLabels {
        private static List<String> labels = new List<String> {
            Label.AColleague,
            Label.ZipPostalCode
        };
    }
    <BLANKLINE>
    """
    header = '@isTest\nprivate class ZLabels {\n    private static List<String> labels = new List<String> {\n'
    footer = '    };\n}\n'
    content = ''.join('        ' + n + ',' + '\n' for n in names)
    content = content[:-2] + '\n'
    return header + content + footer