Remove duplication in test
Use Raphael type in test