Dependencies implements List<Dependency> { public boolean containsDependency(final GAV other) { for (Dependency dependency : dependencies) { if (dependency.isGAVEqual(other)) { return true; } } return false; } Dependencies();  Dependencies(final List<Dependency> dependencies); boolean containsDependency(final GAV other); Dependency get(final GAV gav); Collection<GAV> getGavs(final String... scopes); Collection<GAV> getCompileScopedGavs(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<Dependency> iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] ts); @Override boolean add(Dependency dependency); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> collection); @Override boolean addAll(Collection<? extends Dependency> collection); @Override boolean addAll(int i,
                          Collection<? extends Dependency> collection); @Override boolean removeAll(Collection<?> collection); @Override boolean retainAll(Collection<?> collection); @Override void clear(); @Override Dependency get(int i); @Override Dependency set(int i,
                          Dependency dependency); @Override void add(int i, Dependency dependency); @Override Dependency remove(int i); @Override int indexOf(Object o); @Override int lastIndexOf(Object o); @Override ListIterator<Dependency> listIterator(); @Override ListIterator<Dependency> listIterator(int i); @Override List<Dependency> subList(int i,
                                    int i1);  }
@Test public void testContainsGAV() { assertThat(dependencies.containsDependency(new GAV("org.drools:drools-core:5.0"))).isTrue(); final Dependency dependency = new Dependency(new GAV("org.drools:drools-core:5.0")); dependency.setScope("test"); assertThat(dependencies.containsDependency(dependency)).isTrue(); assertThat(dependencies.containsDependency(new GAV("org.drools:drools-core:4.0"))).isFalse(); }