### Question:
NamespaceRepositoryVertxImpl extends AbstractRepositoryVertxImpl implements NamespaceRepository { @Override public Observable<MosaicId> getLinkedMosaicId(NamespaceId namespaceId) { Consumer<Handler<AsyncResult<NamespaceInfoDTO>>> callback = handler -> getClient().getNamespace(namespaceId.getIdAsHex(), handler); return exceptionHandling( call(callback).map(namespaceInfoDTO -> this.toMosaicId(namespaceInfoDTO.getNamespace()))); } 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 shouldGetLinkedMosaicId() throws Exception { NamespaceId namespaceId = NamespaceId.createFromName("accountalias"); Address ownerAddress = Account.generateNewAccount(networkType).getAddress(); 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.setRegistrationType(NamespaceRegistrationTypeEnum.NUMBER_0); namespace.setOwnerAddress(ownerAddress.encoded()); AliasDTO alias = new AliasDTO(); alias.setType(AliasTypeEnum.NUMBER_1); alias.setMosaicId("528280977531"); namespace.setAlias(alias); dto.setNamespace(namespace); mockRemoteCall(dto); MosaicId linkedMosaicId = repository.getLinkedMosaicId(namespaceId).toFuture().get(); Assertions.assertNotNull(linkedMosaicId); Assertions.assertEquals("0000528280977531", linkedMosaicId.getIdAsHex()); }