The profile is activated automatically when src/test/java directory exists in the project. These artifacts are automatically added to the list of dependencies (in test scope, of course):
- junit:junit: unit testing framework;
- org.hamcrest:hamcrest-core and org.hamcrest:hamcrest-library: assertion framework;
- org.mockito:mockito-core: mocking framework.
Thus, all you need is to create a unit test in src/test/java and all necessary dependencies will be available in classpath.