    @Test
    public void greedyPartitionDifferentTimes() {

        Timestamp now = Timestamp.from(Clock.systemUTC().instant());
        TestTime test1 = new TestTime("test1", 10, false, "host1", now);
        TestTime test2 = new TestTime("test2", 5, false, "host1", now);
        TestTime test3 = new TestTime("test3", 1, false, "host1", now);
        TestTime test4 = new TestTime("test4", 2, false, "host1", now);

        Collection<TestTime> testTimes = Lists.newArrayList(test1, test2, test3, test4);
        Set<TestContainer> testContainers = createTestContainers(2);

        PartitionUtil.greedyPartition(testTimes, testContainers);

        Iterator<TestContainer> iterator = testContainers.iterator();
        TestContainer first = iterator.next();
        TestContainer second = iterator.next();

        assertEquals(18, first.getTime() + second.getTime());
        assertEquals(4, first.getTestTimes().size() + second.getTestTimes().size());

        long longerTime = Math.max(first.getTime(), second.getTime());
        long shorterTime = Math.min(first.getTime(), second.getTime());

        assertEquals(10, longerTime);
        assertEquals(8, shorterTime);
    }