@Test
public void testCheckWithMatchingParentRule() {

    DependencyGraph graph = DependencyGraphFactory.createGraph();
    Node n1 = graph.getOrCreateNodeByName("com.my.a.api.XxDto");
    Node n2 = graph.getOrCreateNodeByName("com.my.a.impl.XxServiceImpl");
    Node n3 = graph.getOrCreateNodeByName("com.google.commons.SuperUtil");
    graph.addDependency(n1, n2, DependencyType.READ_WRITE);
    graph.addDependency(n2, n3, DependencyType.READ_ONLY);
    QavArchitectureReader reader = new QavArchitectureReader("classpath:/qa/arch-for-dependency-checker-test.groovy", null);
    Architecture architecture = reader.getArchitectures().get("Test-1");
    assertThat(architecture, notNullValue());
    new ArchitectureNodeCreator(graph, architecture).createAllArchitectureNodes();
    DependencyChecker checker = new DependencyChecker(graph, architecture);
    assertThat(checker.isOk(), is(true));
    assertThat(checker.getViolationMessages(), hasSize(0));
    assertThat(checker.getViolationMessage(), nullValue());
}