Refactoring on mslds testing layer