@Test
public void testToTree() {

    KeySpace keySpace = new KeySpace(
            new KeySpaceDirectory("state", KeyType.STRING)
                    .addSubdirectory(new KeySpaceDirectory("office_id", KeyType.LONG)
                            .addSubdirectory(new KeySpaceDirectory("employees", KeyType.STRING, "E")
                                    .addSubdirectory(new KeySpaceDirectory("employee_id", KeyType.LONG)))
                            .addSubdirectory(new KeySpaceDirectory("inventory", KeyType.STRING, "I")
                                    .addSubdirectory(new KeySpaceDirectory("stock_id", KeyType.LONG)))
                            .addSubdirectory(new KeySpaceDirectory("sales", KeyType.STRING, "S")
                                    .addSubdirectory(new KeySpaceDirectory("transaction_id", KeyType.UUID))
                                    .addSubdirectory(new KeySpaceDirectory("layaways", KeyType.NULL)
                                            .addSubdirectory(new KeySpaceDirectory("transaction_id", KeyType.UUID))))));
    System.out.println(keySpace.toString());
}