@Override
  public void beforeComponent(Component component) {
    if (FILE.equals(component.getType())) {
      anticipatedTransitions = anticipatedTransitionRepository.getAnticipatedTransitionByComponent(component);
    } else {
      anticipatedTransitions = Collections.emptyList();
    }
  }
@Test
  public void givenAFileComponent_theRepositoryIsHitForFetchingAnticipatedTransitions() {
    Component component = getComponent(Component.Type.FILE);
    when(anticipatedTransitionRepository.getAnticipatedTransitionByComponent(component)).thenReturn(Collections.emptyList());

    underTest.beforeComponent(component);

    verify(anticipatedTransitionRepository).getAnticipatedTransitionByComponent(component);
  }