@Test
public void testRestrictAnyLongAndDirectoryLayerLong() throws Exception {

    assertThrows(RecordCoreArgumentException.class, () ->
            new KeySpace(
                    new KeySpaceDirectory("root", KeyType.STRING, "production")
                            .addSubdirectory(new DirectoryLayerDirectory("dir1"))
                            .addSubdirectory(new KeySpaceDirectory("dir2", KeyType.LONG))));
    assertThrows(RecordCoreArgumentException.class, () ->
            new KeySpace(
                    new KeySpaceDirectory("root", KeyType.STRING, "production")
                            .addSubdirectory(new DirectoryLayerDirectory("dir1",  "A"))
                            .addSubdirectory(new KeySpaceDirectory("dir2", KeyType.LONG))));
}