@@ -0,0 +1,1321 @@
+package checkdep.value.constraint;%0A%0Aimport static com.google.common.collect.Sets.*;%0Aimport static org.hamcrest.CoreMatchers.*;%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Iterator;%0Aimport java.util.Map.Entry;%0A%0Aimport org.junit.Test;%0A%0Aimport checkdep.value.depend.Dependencies;%0Aimport checkdep.value.depend.Dependency;%0Aimport checkdep.value.depend.PackageName;%0Aimport checkdep.value.depend.PackageNames;%0A%0Apublic class ConstraintsTest %7B%0A%0A  @Test%0A  public void testToDependencies() %7B%0A    Constraints target = Constraints.builder()%0A        .add(%22a%22, %22b%22)%0A        .add(%22a%22, %22c%22)%0A        .add(%22b%22, %22c%22)%0A        .build();%0A%0A    Dependencies res = target.toDependencies();%0A%0A    Iterator%3CEntry%3CPackageName, Dependency%3E%3E it = res.entrySet().iterator();%0A    assertEntry(it.next(), new PackageName(%22a%22),%0A        newHashSet(new PackageName(%22b%22), new PackageName(%22c%22)));%0A    assertEntry(it.next(), new PackageName(%22b%22),%0A        newHashSet(new PackageName(%22c%22)));%0A    assertFalse(it.hasNext());%0A  %7D%0A%0A  private void assertEntry(Entry%3CPackageName, Dependency%3E item,%0A      PackageName name, HashSet%3CPackageName%3E efferents) %7B%0A    assertThat(item.getKey(), is(name));%0A    assertThat(item.getValue().getName(), is(name));%0A    assertThat(item.getValue().getEfferents(), is(new PackageNames(efferents)));%0A  %7D%0A%7D%0A

test add ConstraintsTest