JUnit Test for dismantling algorithm and update