CacheResourceImpl implements CacheResource { @Override public List<String> list() { return cacheManagerService.getCacheNames(); } @Inject  CacheResourceImpl(final NodeService nodeService,
                      final NodeInfo nodeInfo,
                      final WebTargetFactory webTargetFactory,
                      final CacheManagerService cacheManagerService,
                      final TaskContextFactory taskContextFactory); @Override List<String> list(); @Override CacheInfoResponse info(final String cacheName, final String nodeName); @Override Long clear(final String cacheName, final String nodeName);  }
@Test void list() { final String subPath = ""; final List<String> expectedResponse = List.of("cache1", "cache2"); initNodes(); when(cacheManagerServiceMocks.get("node1").getCacheNames()) .thenReturn(expectedResponse); doGetTest( subPath, List.class, expectedResponse); }