### Question:
NamespaceInfo implements Stored { public boolean isSubnamespace() { return this.registrationType == NamespaceRegistrationType.SUB_NAMESPACE; } @SuppressWarnings("squid:S00107")  NamespaceInfo(
      String recordId,
      boolean active,
      Integer index,
      String metaId,
      NamespaceRegistrationType registrationType,
      Integer depth,
      List<NamespaceId> levels,
      NamespaceId parentId,
      UnresolvedAddress ownerAddress,
      BigInteger startHeight,
      BigInteger endHeight,
      Alias alias); Optional<String> getRecordId(); boolean isActive(); boolean isExpired(); Integer getIndex(); String getMetaId(); NamespaceRegistrationType getRegistrationType(); Integer getDepth(); List<NamespaceId> getLevels(); UnresolvedAddress getOwnerAddress(); BigInteger getStartHeight(); BigInteger getEndHeight(); NamespaceId getId(); boolean isRoot(); Alias getAlias(); boolean hasAlias(); boolean isSubnamespace(); NamespaceId parentNamespaceId();  }### Answer:
@Test void shouldReturnSubNamespaceFalseWhenNamespaceInfoIsFromRootNamespace() { NamespaceInfo namespaceInfo = createRootNamespaceInfo(); assertFalse(namespaceInfo.isSubnamespace()); }
@Test void shouldReturnSubNamespaceTrueWhenNamespaceInfoIsFromSubNamespace() { NamespaceInfo namespaceInfo = createSubNamespaceInfo(); assertTrue(namespaceInfo.isSubnamespace()); }