public static List<BlockParserFactory> calculateBlockParserFactories(List<BlockParserFactory> customBlockParserFactories, Set<Class<? extends Block>> enabledBlockTypes) {
        List<BlockParserFactory> list = new ArrayList<>();
        // By having the custom factories come first, extensions are able to change behavior of core syntax.
        list.addAll(customBlockParserFactories);
        for (Class<? extends Block> blockType : enabledBlockTypes) {
            list.add(NODES_TO_CORE_FACTORIES.get(blockType));
        }
        return list;
    }
@Test
    public void calculateBlockParserFactories_givenAFullListOfAllowedNodes_includesAllCoreFactories() {
        List<BlockParserFactory> customParserFactories = List.of();
        var enabledBlockTypes = Set.of(BlockQuote.class, Heading.class, FencedCodeBlock.class, HtmlBlock.class, ThematicBreak.class, ListBlock.class, IndentedCodeBlock.class);

        List<BlockParserFactory> blockParserFactories = DocumentParser.calculateBlockParserFactories(customParserFactories, enabledBlockTypes);
        assertThat(blockParserFactories.size(), is(CORE_FACTORIES.size()));

        for (BlockParserFactory factory : CORE_FACTORIES) {
            assertTrue(hasInstance(blockParserFactories, factory.getClass()));
        }
    }