public boolean isDisplayedExpectingComponents(){
  boolean result=false;
  if (conditions.isConditionMet(visibilityOf(window))) {
    if (components.isEmpty()) {
      closeButton.click();
    }
 else {
      result=true;
    }
  }
  return result;
}

public boolean isDisplayedExpectingComponents ( ) { boolean result = false ; if ( conditions . isConditionMet ( visibilityOf ( window ) ) ) { if ( components . isEmpty ( ) ) { closeButton . click ( ) ; } else { result = true ; } } return result ; }
this check contains a workaround for an issue in aem 6 . 1 , when after the deploy occasionally insert window contains an empty list .
