@Test
public void recursivelyFindIsPropertyType() {

    Map<String, FactModelTree.PropertyTypeName> bookSimpleProperties = new HashMap<>();
    bookSimpleProperties.put("name", new FactModelTree.PropertyTypeName("String"));
    Map<String, String> bookExpandableProperties = new HashMap<>();
    bookExpandableProperties.put("author", "Author");
    Map<String, FactModelTree.PropertyTypeName> authorSimpleProperties = new HashMap<>();
    authorSimpleProperties.put("books", new FactModelTree.PropertyTypeName("List"));
    Map<String, String> authorExpandableProperties = new HashMap<>();
    FactModelTree bookFactModelTreeMock = getMockedFactModelTree(bookSimpleProperties, bookExpandableProperties);
    FactModelTree authorFactModelTreeMock = getMockedFactModelTree(authorSimpleProperties, authorExpandableProperties);
    when(dataObjectFieldsMapMock.get("Author")).thenReturn(authorFactModelTreeMock);
    when(dataObjectFieldsMapMock.get("Book")).thenReturn(bookFactModelTreeMock);
    assertFalse(((SetHeaderCellValueCommand) commandSpy).recursivelyFindIsPropertyType(scenarioSimulationContextLocal, bookFactModelTreeMock, Collections.singletonList("not-existing")));
    assertTrue(((SetHeaderCellValueCommand) commandSpy).recursivelyFindIsPropertyType(scenarioSimulationContextLocal, bookFactModelTreeMock, Collections.singletonList("name")));
    assertFalse(((SetHeaderCellValueCommand) commandSpy).recursivelyFindIsPropertyType(scenarioSimulationContextLocal, bookFactModelTreeMock, Arrays.asList("author", "not-existing")));
    assertTrue(((SetHeaderCellValueCommand) commandSpy).recursivelyFindIsPropertyType(scenarioSimulationContextLocal, bookFactModelTreeMock, Arrays.asList("author", "books")));
}