JdbcUserGoogleMfaCredentialsProvisioning implements SystemDeletable, UserMfaCredentialsProvisioning<UserGoogleMfaCredentials> { @Override public UserGoogleMfaCredentials retrieve(String userId, String mfaProviderId) { try { return jdbcTemplate.queryForObject(QUERY_USER_MFA_CONFIG_ALL_SQL, mapper, userId, mfaProviderId); } catch (EmptyResultDataAccessException e) { throw new UserMfaConfigDoesNotExistException("No Creds for user " + userId); } } JdbcUserGoogleMfaCredentialsProvisioning(JdbcTemplate jdbcTemplate, EncryptionKeyService encryptionKeyService); @Override void save(UserGoogleMfaCredentials credentials, String zoneId); @Override void update(UserGoogleMfaCredentials credentials, String zoneId); @Override UserGoogleMfaCredentials retrieve(String userId, String mfaProviderId); @Override int deleteByUser(String userId, String zoneId); @Override int deleteByMfaProvider(String mfaProviderId, String zoneId); @Override int deleteByIdentityZone(String zoneId); @Override int delete(String userId); @Override Logger getLogger();  }
@Test void retrieveNotExisting() { assertThrows(UserMfaConfigDoesNotExistException.class, () -> db.retrieve("user1", MFA_ID)); }