refactoring code unit-tests for cluster
refactoring code unit-tests for cluster