when(cache.get(eq("checkstyle-plugin.jar"), eq("fakemd5_1"), any(FileCache.Downloader.class))).thenReturn(pluginJar);
ServerClient server = mock(ServerClient.class);
DefaultPluginsReferential downloader = new DefaultPluginsReferential(cache, server);
RemotePlugin plugin = new RemotePlugin("checkstyle", true)
.setFile("checkstyle-plugin.jar", "fakemd5_1");
File file = downloader.pluginFile(plugin);
assertThat(file).isEqualTo(pluginJar);
}