added test function into ERDBuilder