added jung api to algorithm
test refactoring 1: setUp method
test refactoring 2: exception handling
test refactoring 3: assertNotNull
test refactoring 4: assertEquals