@Test
public void testRestrictAnyDirectoryLayerAndConstantDirectoryLayer() throws Exception {

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