### Question:
NamespaceRepositoryVertxImpl extends AbstractRepositoryVertxImpl implements NamespaceRepository { @Override public Observable<NamespaceInfo> getNamespace(NamespaceId namespaceId) { Consumer<Handler<AsyncResult<NamespaceInfoDTO>>> callback = handler -> getClient().getNamespace(namespaceId.getIdAsHex(), handler); return exceptionHandling(call(callback).map(this::toNamespaceInfo)); } NamespaceRepositoryVertxImpl(ApiClient apiClient); NamespaceRoutesApi getClient(); @Override Observable<NamespaceInfo> getNamespace(NamespaceId namespaceId); @Override Observable<Page<NamespaceInfo>> search(NamespaceSearchCriteria criteria); @Override Observable<List<NamespaceName>> getNamespaceNames(List<NamespaceId> namespaceIds); @Override Observable<List<MosaicNames>> getMosaicsNames(List<MosaicId> ids); @Override Observable<MosaicId> getLinkedMosaicId(NamespaceId namespaceId); @Override Observable<Address> getLinkedAddress(NamespaceId namespaceId); @Override Observable<List<AccountNames>> getAccountsNames(List<Address> addresses);  }### Answer:
@Test public void shouldGetNamespace() throws Exception { Address ownerAddress = Account.generateNewAccount(networkType).getAddress(); NamespaceId namespaceId = NamespaceId.createFromName("accountalias"); NamespaceInfoDTO dto = new NamespaceInfoDTO(); NamespaceMetaDTO meta = new NamespaceMetaDTO(); meta.setActive(true); meta.setId("SomeId"); meta.setIndex(123); dto.setMeta(meta); NamespaceDTO namespace = new NamespaceDTO(); namespace.setDepth(111); namespace.setStartHeight(BigInteger.valueOf(4)); namespace.setEndHeight(BigInteger.valueOf(5)); namespace.setRegistrationType(NamespaceRegistrationTypeEnum.NUMBER_1); namespace.setOwnerAddress(ownerAddress.encoded()); AliasDTO alias = new AliasDTO(); alias.setType(AliasTypeEnum.NUMBER_1); alias.setMosaicId("123"); namespace.setAlias(alias); dto.setNamespace(namespace); mockRemoteCall(dto); NamespaceInfo info = repository.getNamespace(namespaceId).toFuture().get(); Assertions.assertNotNull(info); Assertions.assertEquals(NamespaceRegistrationType.SUB_NAMESPACE, info.getRegistrationType()); Assertions.assertEquals(meta.getId(), info.getMetaId()); Assertions.assertEquals(meta.getIndex(), info.getIndex()); Assertions.assertEquals(meta.getActive(), info.isActive()); Assertions.assertEquals(BigInteger.valueOf(4), info.getStartHeight()); Assertions.assertEquals(BigInteger.valueOf(5), info.getEndHeight()); }