### Question:
NamespaceRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements NamespaceRepository { @Override public Observable<List<NamespaceName>> getNamespaceNames(List<NamespaceId> namespaceIds) { NamespaceIds ids = new NamespaceIds() .namespaceIds( namespaceIds.stream().map(NamespaceId::getIdAsHex).collect(Collectors.toList())); Callable<List<NamespaceNameDTO>> callback = () -> getClient().getNamespacesNames(ids); return exceptionHandling( call(callback) .flatMapIterable(item -> item) .map(this::toNamespaceName) .toList() .toObservable()); } 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 shouldGetNamespaceNames() throws Exception { NamespaceId namespaceId = NamespaceId.createFromName("accountalias"); NamespaceNameDTO dto1 = new NamespaceNameDTO(); dto1.setName("someName1"); dto1.setId("1"); dto1.setParentId("2"); NamespaceNameDTO dto2 = new NamespaceNameDTO(); dto2.setName("someName2"); dto2.setId("3"); mockRemoteCall(Arrays.asList(dto1, dto2)); List<NamespaceName> names = repository.getNamespaceNames(Arrays.asList(namespaceId)).toFuture().get(); Assertions.assertNotNull(names); Assertions.assertEquals(2, names.size()); Assertions.assertEquals("someName1", names.get(0).getName()); Assertions.assertEquals(BigInteger.valueOf(1L), names.get(0).getNamespaceId().getId()); Assertions.assertEquals( BigInteger.valueOf(2L), names .get(0) .getParentId() .orElseThrow(() -> new IllegalStateException("No parent id")) .getId()); Assertions.assertEquals("someName2", names.get(1).getName()); Assertions.assertEquals(BigInteger.valueOf(3L), names.get(1).getNamespaceId().getId()); Assertions.assertFalse(names.get(1).getParentId().isPresent()); }