@Test
void shouldFindExistingInCache() throws IOException {

    File testFile = new File("testFolder");
    new MockUp<GazePlayDirectories>() {
        @mockit.Mock
        public File getGazePlayFolder() {
            return testFile;
        }
    };
    URL resource = new URL("https://opengameart.org/sites/default/files/TalkingCuteChiptune_0.mp3");
    File folder = new File(testFile, "cache/music");
    folder.mkdirs();
    File expected = new File(folder,
        new String(Base64.getEncoder().encode(resource.toExternalForm().getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8));
    expected.createNewFile();
    File result = musicManagerSpy.downloadAndGetFromCache(resource, resource.toExternalForm());
    assertEquals(expected, result);
    FileUtils.deleteDirectory(testFile);
}