### Question:
NamespaceId implements UnresolvedMosaicId, UnresolvedAddress { public static NamespaceId createFromName(String namespaceName) { return new NamespaceId( IdGenerator.generateNamespaceId(namespaceName), Optional.of(namespaceName)); } NamespaceId(String hex); private  NamespaceId(BigInteger id, Optional<String> fullName); static NamespaceId createFromName(String namespaceName); static NamespaceId createFromIdAndFullName(BigInteger id, String fullName); static NamespaceId createFromNameAndParentId(String namespaceName, BigInteger parentId); static NamespaceId createFromNameAndParentName(
      String namespaceName, String parentNamespaceName); static NamespaceId createFromId(BigInteger id); static List<BigInteger> getNamespacePath(String namespaceName); BigInteger getId(); long getIdAsLong(); Optional<String> getFullName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String encoded(NetworkType networkType); @Override String getIdAsHex();  }### Answer:
@Test @SuppressWarnings("squid:S3415") public void shouldCompareNamespaceIdsForEqualityUsingNames() { NamespaceId test = NamespaceId.createFromName("subnem"); NamespaceId test2 = NamespaceId.createFromName("subnem"); NamespaceId test3 = NamespaceId.createFromName("another"); assertEquals(test, test2); Assertions.assertNotEquals(test, test3); Assertions.assertNotEquals("NotANamespaceId", test3); Assertions.assertNotEquals(test3, "NotANamespaceId"); }