public List<Uuid> directories() {
        return directories;
    }
@Test
    public void testDirectoriesAreSorted() {
        BrokerRegistration registration = new BrokerRegistration.Builder().
                setId(0).
                setEpoch(0).
                setIncarnationId(Uuid.fromString("ik32HZbLTW6ulw1yyrC8jQ")).
                setListeners(Collections.singletonList(new Endpoint("INTERNAL", SecurityProtocol.PLAINTEXT, "localhost", 9090))).
                setSupportedFeatures(Collections.singletonMap("foo", VersionRange.of((short) 1, (short) 2))).
                setRack(Optional.empty()).
                setFenced(false).
                setInControlledShutdown(false).
                setDirectories(Arrays.asList(
                    Uuid.fromString("3MWIBL9NR4eXhtdfBVA7Bw"),
                    Uuid.fromString("SZQIVeLMQGiNi68StNSNZA"),
                    Uuid.fromString("LWZsWPBrQruOMMrnEBj7bw"),
                    Uuid.fromString("OpIJIaO6RKaOGvHlNmOEhA"),
                    Uuid.fromString("JhYia5HRTLihf2FFJVxopQ"),
                    Uuid.fromString("VNetSHnySxSbvjwKrBzpkw"))
                ).
                build();
        assertEquals(Arrays.asList(
                Uuid.fromString("3MWIBL9NR4eXhtdfBVA7Bw"),
                Uuid.fromString("JhYia5HRTLihf2FFJVxopQ"),
                Uuid.fromString("LWZsWPBrQruOMMrnEBj7bw"),
                Uuid.fromString("OpIJIaO6RKaOGvHlNmOEhA"),
                Uuid.fromString("SZQIVeLMQGiNi68StNSNZA"),
                Uuid.fromString("VNetSHnySxSbvjwKrBzpkw")
        ), registration.directories());
    }