Here is an example of a test using Pax Exam.
package com.example.project.test;
import static org.junit.Assert.*;
import static org.ops4j.pax.exam.CoreOptions.*;
import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;...