LoadImbalance updateImbalance() {
        clearWorkingImbalance();
        updateNewWorkingImbalance();
        updateNewFinalImbalance();
        printDebugTable();
        return imbalance;
    }
@Test
    public void testUpdateImbalance() throws Exception {
        MigratablePipeline owner1Pipeline1 = mock(MigratablePipeline.class);
        when(owner1Pipeline1.load()).thenReturn(0L)
                .thenReturn(100L);
        when(owner1Pipeline1.owner())
                .thenReturn(owner1);
        loadTracker.addPipeline(owner1Pipeline1);

        MigratablePipeline owner2Pipeline1 = mock(MigratablePipeline.class);
        when(owner2Pipeline1.load())
                .thenReturn(0L)
                .thenReturn(200L);
        when(owner2Pipeline1.owner())
                .thenReturn(owner2);
        loadTracker.addPipeline(owner2Pipeline1);

        MigratablePipeline owner2Pipeline3 = mock(MigratablePipeline.class);
        when(owner2Pipeline3.load())
                .thenReturn(0L)
                .thenReturn(100L);
        when(owner2Pipeline3.owner())
                .thenReturn(owner2);
        loadTracker.addPipeline(owner2Pipeline3);

        LoadImbalance loadImbalance = loadTracker.updateImbalance();
        assertEquals(0, loadImbalance.minimumLoad);
        assertEquals(0, loadImbalance.maximumLoad);

        loadTracker.updateImbalance();
        assertEquals(100, loadImbalance.minimumLoad);
        assertEquals(300, loadImbalance.maximumLoad);
        assertEquals(owner1, loadImbalance.dstOwner);
        assertEquals(owner2, loadImbalance.srcOwner);
    }