private Dependency(JavaClass originClass, JavaClass targetClass, SourceCodeLocation sourceCodeLocation, String description) {
        checkArgument(!originClass.equals(targetClass) || targetClass.isPrimitive(),
                "Tried to create illegal dependency '%s' (%s -> %s), this is likely a bug!",
                description, originClass.getSimpleName(), targetClass.getSimpleName());

        this.originClass = originClass;
        this.targetClass = targetClass;
        this.description = description;
        this.sourceCodeLocation = sourceCodeLocation;
        hashCode = Objects.hash(originClass, targetClass, sourceCodeLocation, description);
    }
@Test
    public void dependency_predicates_descriptions() {
        assertThat(dependency(Origin.class, Target.class))
                .hasSameDescriptionAs(dependency(Origin.class.getName(), Target.class.getName()))
                .hasDescription("dependency " + Origin.class.getName() + " -> " + Target.class.getName());

        assertThat(dependency(predicateWithDescription("first"), predicateWithDescription("second")))
                .hasDescription("dependency first -> second");
    }