@Test
public void when_getNestingForm_is_provided_with_component_which_hasnt_form_ancestor_then_null_is_returned() {

    // given
    UIComponent viewRoot = mock(UIViewRoot.class);
    UIComponent component1 = mock(UIComponent.class);
    UIComponent component2 = mock(UIComponent.class);
    when(component1.getParent()).thenReturn(component2);
    when(component2.getParent()).thenReturn(viewRoot);
    // when
    UIComponent result = utils.getNestingForm(component1);
    // then
    assertNull(result);
}