@Test public void testScrubRawStr2() { when(mockDecryptPassword.decrypt("secret")).thenReturn("secret"); final String result = jvmWinSvcAcctPasswordScrubberService.scrub(TEST_RAW_STR_2); assertEquals(SCRUBBED_STR_2, result); }
@Override public String scrub(final String raw) { for (final String password : objectStoreService.getIterable()) { final String scrubbedStr = raw.replaceAll(decryptor.decrypt(password), REPLACEMENT); if (!raw.equalsIgnoreCase(scrubbedStr)) { return scrubbedStr; } } return raw; }
JvmWinSvcAcctPasswordScrubberServiceImpl implements ScrubberService { @Override public String scrub(final String raw) { for (final String password : objectStoreService.getIterable()) { final String scrubbedStr = raw.replaceAll(decryptor.decrypt(password), REPLACEMENT); if (!raw.equalsIgnoreCase(scrubbedStr)) { return scrubbedStr; } } return raw; } }
JvmWinSvcAcctPasswordScrubberServiceImpl implements ScrubberService { @Override public String scrub(final String raw) { for (final String password : objectStoreService.getIterable()) { final String scrubbedStr = raw.replaceAll(decryptor.decrypt(password), REPLACEMENT); if (!raw.equalsIgnoreCase(scrubbedStr)) { return scrubbedStr; } } return raw; } JvmWinSvcAcctPasswordScrubberServiceImpl(final ObjectStoreService<String> objectStoreService,
                                                    final DecryptPassword decryptor); }
JvmWinSvcAcctPasswordScrubberServiceImpl implements ScrubberService { @Override public String scrub(final String raw) { for (final String password : objectStoreService.getIterable()) { final String scrubbedStr = raw.replaceAll(decryptor.decrypt(password), REPLACEMENT); if (!raw.equalsIgnoreCase(scrubbedStr)) { return scrubbedStr; } } return raw; } JvmWinSvcAcctPasswordScrubberServiceImpl(final ObjectStoreService<String> objectStoreService,
                                                    final DecryptPassword decryptor); @Override String scrub(final String raw); }
JvmWinSvcAcctPasswordScrubberServiceImpl implements ScrubberService { @Override public String scrub(final String raw) { for (final String password : objectStoreService.getIterable()) { final String scrubbedStr = raw.replaceAll(decryptor.decrypt(password), REPLACEMENT); if (!raw.equalsIgnoreCase(scrubbedStr)) { return scrubbedStr; } } return raw; } JvmWinSvcAcctPasswordScrubberServiceImpl(final ObjectStoreService<String> objectStoreService,
                                                    final DecryptPassword decryptor); @Override String scrub(final String raw);  }