@Test
void onlyLeafNodesCreatedForSimpleEnum() {

    TrieNode<Enum<?>> simpleTrie = EnumTrieCreator.create(SimpleEnum.class);
    assertThat(simpleTrie).isInstanceOf(Branch.class);
    Map<String, ? extends TrieNode<?>> branches = ((Branch<?>) simpleTrie).branches;
    assertThat(branches).hasSize(2);
    assertThat(branches.values()).allMatch(n -> n instanceof TrieNode.Leaf);
    assertThat(branches.get("YES")).isEqualTo(new Leaf<>(SimpleEnum.YES));
    assertThat(branches.get("NO")).isEqualTo(new Leaf<>(SimpleEnum.NO));
}