@PublicAPI(usage = ACCESS)
    public Set<Dependency> getDependenciesFromSelf() {
        ImmutableSet.Builder<Dependency> result = ImmutableSet.builder();
        for (JavaClass javaClass : this) {
            for (Dependency dependency : javaClass.getDirectDependenciesFromSelf()) {
                if (isNotAssignedToOwnSlice(dependency.getTargetClass())) {
                    result.add(dependency);
                }
            }
        }
        return result.build();
    }
@Test
    public void dependencies_from_self() {
        Slice slice = getSlice(slicesOfTestClasses(), "first");

        assertThatDependencies(slice.getDependenciesFromSelf()).containOnly(
                from(FirstAnyPkgClass.class).to(Object.class)
                        .from(FirstAnyPkgClass.class).to(SomePkgSubclass.class)
                        .from(FirstAnyPkgClass.class).to(SecondThreeAnyClass.class)
                        .from(ClassOnlyDependentOnOwnPackageAndObject.class).to(Object.class)
                        .from(FirstThreeAnyClass.class).to(Object.class)
                        .from(FirstThreeAnyClass.class).to(SecondThreeAnyClass.class)
        );
    }