JetClientInstanceImpl extends AbstractJetInstance { public List<DistributedObjectInfo> getDistributedObjects() { return invokeRequestOnAnyMemberAndDecodeResponse( ClientGetDistributedObjectsCodec.encodeRequest(), response -> ClientGetDistributedObjectsCodec.decodeResponse(response).response ); } JetClientInstanceImpl(HazelcastClientInstanceImpl hazelcastInstance); @Nonnull @Override JetConfig getConfig(); @Nonnull @Override List<Job> getJobs(); @Nonnull List<JobSummary> getJobSummaryList(); @Nonnull HazelcastClientInstanceImpl getHazelcastClient(); @Override boolean existsDistributedObject(@Nonnull String serviceName, @Nonnull String objectName); List<DistributedObjectInfo> getDistributedObjects(); @Override List<Long> getJobIdsByName(String name); @Override Job newJobProxy(long jobId, Object jobDefinition, JobConfig config); @Override Job newJobProxy(long jobId); @Override ILogger getLogger();  }
@Test public void given_singleMapOnMember_when_getDistributedObjectsCalled_then_ReturnedObjectInfo() { JetInstance member = createJetMember(); JetClientInstanceImpl client = (JetClientInstanceImpl) createJetClient(); String mapName = randomMapName(); member.getMap(mapName); List<DistributedObjectInfo> objects = client.getDistributedObjects(); assertFalse(objects.isEmpty()); DistributedObjectInfo info = objects.stream() .filter(i -> mapName.equals(i.getName())) .findFirst() .orElseThrow(AssertionError::new); assertEquals(MapService.SERVICE_NAME, info.getServiceName()); }