ContainerEndpointsCache { public List<ContainerEndpoint> read(ApplicationId applicationId) { var optionalData = curator.getData(containerEndpointsPath(applicationId)); return optionalData.map(SlimeUtils::jsonToSlime) .map(ContainerEndpointSerializer::endpointListFromSlime) .orElseGet(List::of); } ContainerEndpointsCache(Path tenantPath, Curator curator); List<ContainerEndpoint> read(ApplicationId applicationId); void write(ApplicationId applicationId, List<ContainerEndpoint> endpoints); CuratorTransaction delete(ApplicationId application);  }
@Test public void readingNonExistingEntry() { final var cache = new ContainerEndpointsCache(Path.createRoot(), new MockCurator()); final var endpoints = cache.read(ApplicationId.defaultId()); assertTrue(endpoints.isEmpty()); }