@Test
public void retriesFiveTimes() {

  setupViewChangedScenario(false, false);
  int numRetries = 5;
  try {
    testSubject.createAxeViews(rootNodeMock);
    Assert.fail("Expected createAxeViews to throw exception");
  } catch (ViewChangedException e) {
    verify(rootNodeMock, times(numRetries)).refresh();
    verify(queueBuilderMock, times(numRetries + 1)).buildPriorityQueue(rootNodeMock);
    verify(rootNodeMock, times(numRetries + 1)).getChildCount();
    verify(rootNodeMock, times(numRetries + 1)).getChild(0);
  }
}