Start refactor of junit tests