@Test
public void shouldSortTasks() throws Exception {

    // given
    tasks.add(new MockUpgradeTask("12.3-EE", "fourth", 4, USER)); // 4
    tasks.add(new MockUpgradeTask("1.4-EE", "second", 2, USER)); // 2
    tasks.add(new MockUpgradeTask("75.12.0-EE", "sixth", 6, USER)); // 6
    tasks.add(new MockUpgradeTask("100.5.0-EE", "seventh", 7, USER)); // 7
    tasks.add(new MockUpgradeTask("2.5-PE", "third", 3, USER)); // 3
    tasks.add(new MockUpgradeTask("1.3-PE", "first", 1, USER)); // 1
    tasks.add(new MockUpgradeTask("50.4-PE", "fifth", 5, USER)); // 5
    // when
    service.sortAndCheckTasks();
    // then
    int i = 1;
    for (UpgradeTask task : tasks) {
        assertEquals(i, task.getId().getOrder());
        i++;
    }
}