Working version of junit testing