I googled all I could think of for solutions, but phrasing is difficult.
I have a unit test that calls delete on a Spring Repository. The repo is defined as:
public interface FileConfigurationRepository extends CasenetRepository<FileConfiguration, String> {}
The method I'm testing has the following call:
fileConfigurationRepository.delete(GlobalConfiguration.CUSTOM_LOGO_ID);
Where GlobalConfiguration.CUSTOM_LOGO_ID is defined as:
public static final String CUSTOM_LOGO_ID = "customLogoId";
So I wrote my mock as follows:
Mockito.when(fileConfigurationRepository.delete(GlobalConfiguration.CUSTOM_LOGO_ID)).thenThrow(new Exception());
But then I get the following error:
The text of the error:
No instance(s) of type variable(s) T exist so that void conforms to T
Unsure how to proceed.