Trait testing in JUnit