@Test
public void testNotOk() {

    init(false, false);
    @SuppressWarnings("unchecked")
    List<String> uses = (List<String>) architectureGraph.getNode("com.my.a").getProperty(Constants.USES_API);
    uses.add("com.my.other");
    new DependencyChecker(architectureGraph, packageArchitecture);
    AllExplicitRulesUsedChecker checker = new AllExplicitRulesUsedChecker(architectureGraph, packageArchitecture);
    assertThat(checker.isOk(), is(false));
    assertThat(checker.getViolationMessage(), is("1 unused rules: [com.my.a: com.my.other]"));
}