It\'s a while since I met such puzzling issue. I\'m having a class that references another one sitting in another package in the same application, that is, NOT in another jar ar
With maven your tests can access to all the source code of your project (src/main/java) and all the test source code (default is src/test/java).
Here, your profile rest defines the test source directory as src/test/java/com/thalasoft/learnintouch/rest So, your test code can access everything in src/main/java and everything in src/test/java/com/thalasoft/learnintouch/rest
Your profile acceptance defines the test source directory as src/test/java/com/thalasoft/learnintouch/rest/acceptance So, your test code can access everything in src/main/java and everything in src/test/java/com/thalasoft/learnintouch/rest/acceptance. WebTestConfiguration is not accessible since it's in a package above.
To run specific tests with different profiles, I recommend to configure the surefire plugin in charge of running tests. A good example is available here : https://weblogs.java.net/blog/carcassi/archive/2011/04/21/running-integration-tests-and-unit-tests-separately-maven