Re factored some tests