### Question:
NamespaceRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements NamespaceRepository { @Override public Observable<MosaicId> getLinkedMosaicId(NamespaceId namespaceId) { Callable<NamespaceInfoDTO> callback = () -> getClient().getNamespace(namespaceId.getIdAsHex()); return exceptionHandling( call(callback).map(namespaceInfoDTO -> this.toMosaicId(namespaceInfoDTO.getNamespace()))); } NamespaceRepositoryOkHttpImpl(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<MosaicId> getLinkedMosaicId(NamespaceId namespaceId); @Override Observable<Address> getLinkedAddress(NamespaceId namespaceId); @Override Observable<List<AccountNames>> getAccountsNames(List<Address> addresses); @Override Observable<List<MosaicNames>> getMosaicsNames(List<MosaicId> ids);  }### Answer:
@Test public void shouldGetLinkedMosaicId() throws Exception { Address ownerAccount = Account.generateNewAccount(NetworkType.MIJIN_TEST).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.setRegistrationType(NamespaceRegistrationTypeEnum.NUMBER_0); namespace.setOwnerAddress(ownerAccount.encoded()); AliasDTO alias = new AliasDTO(); alias.setType(AliasTypeEnum.NUMBER_1); alias.setMosaicId("528280977531AAA"); namespace.setAlias(alias); dto.setNamespace(namespace); mockRemoteCall(dto); MosaicId linkedMosaicId = repository.getLinkedMosaicId(namespaceId).toFuture().get(); Assertions.assertNotNull(linkedMosaicId); Assertions.assertEquals( MapperUtils.fromHexToBigInteger("528280977531AAA"), linkedMosaicId.getId()); }