@Test
public void shouldNotApplyUserTasks() throws Exception {

    // given
    tasks.add(new MockUpgradeTask("1.3-PE", "first", 1, USER));
    tasks.add(new MockUpgradeTask("1.4-EE", "second", 2, USER));
    tasks.add(new MockUpgradeTask("2.5-PE", "third", 3, USER));
    tasks.add(new MockUpgradeTask("12.3-EE", "fourth", 4, USER));
    tasks.add(new MockUpgradeTask("50.4-PE", "fifth", 5, USER));
    tasks.add(new MockUpgradeTask("2.12.0-EE", "sixth", 6, USER));
    tasks.add(new MockUpgradeTask("10.5.0-EE", "seventh", 7, USER));
    // when
    when(repository.isAlreadyApplied(anyString(), any())).thenReturn(true);
    service.upgradeUser("Mr Anonymous");
    // then
    for (UpgradeTask task : tasks) {
        final MockUpgradeTask mockTask = (MockUpgradeTask) task;
        assertFalse(mockTask.applied);
    }
}