@Test
public void testHashCode() {

    EmbeddedPackageInstallable self = new EmbeddedPackageInstallable(
            PackageId.fromString("test:test:1"),
            "/some/path",
            PackageId.fromString("test:testtest:1"));
    assertEquals("expect self to equal self", self.hashCode(), self.hashCode());
    assertEquals("expect self to equal other same params", self.hashCode(),
            new EmbeddedPackageInstallable(
                    self.getParentId(),
                    self.getJcrPath(),
                    self.getEmbeddedId()).hashCode());
    assertNotEquals("expect self to equal other different path", self.hashCode(),
            new EmbeddedPackageInstallable(
                    self.getParentId(),
                    "/some/other/path",
                    self.getEmbeddedId()).hashCode());
    assertNotEquals("expect self to equal other different parent id", self.hashCode(),
            new EmbeddedPackageInstallable(
                    self.getEmbeddedId(),
                    self.getJcrPath(),
                    self.getEmbeddedId()).hashCode());
    assertNotEquals("expect self to equal other different embedded id", self.hashCode(),
            new EmbeddedPackageInstallable(
                    self.getParentId(),
                    self.getJcrPath(),
                    self.getParentId()).hashCode());
}