Multiply floating store factories for type safety

This commit is contained in:
René Pfeuffer
2018-12-04 08:56:39 +01:00
parent 33f3216164
commit 3021bea65a
23 changed files with 245 additions and 87 deletions

View File

@@ -126,8 +126,8 @@ public class SecureKeyResolverTest
{
ConfigurationEntryStoreFactory factory = mock(ConfigurationEntryStoreFactory.class);
when(factory.withName(any())).thenCallRealMethod();
when(factory.getStore(argThat(storeParameters -> {
when(factory.withType(any())).thenCallRealMethod();
when(factory.<SecureKey>getStore(argThat(storeParameters -> {
assertThat(storeParameters.getName()).isEqualTo(SecureKeyResolver.STORE_NAME);
assertThat(storeParameters.getType()).isEqualTo(SecureKey.class);
return true;