added jUnit tests