). check("com.kaching.supermap").mayDependOn( "com.kaching.platform.guice", "voldemort.*" ). assertIsVerified(jDepend.getPackages()); Relying on the JDepend library , the test traverses Java class file directories and records dependencies by inspecting the bytecode . It then compares the recorded dependencies with the specified ones and generates a report. If the dependencies do not match, our build goes red