While there is no only right way, the usual approach is to keep unit tests in the same project.
You can create a second source folder (like
test), where you put your test classes into the same packages as the classes under test. This also allows you to test package-private classes while not flooding your main source packages with test classes.
Your source folder/package structure would then look like this:
You can then configure your build to not include the
test source folder when packing the JAR.