@Test public void testEmptyWeakCipherSuites() { Set<String> weakCipherSuites = new HashSet<>(); packetAnalyzerResult = getPacketAnalyzerResult(weakCipherSuites); result = (WeakCipherResult) ((WeakCipherImpl) bestPractice).runTest(packetAnalyzerResult); assertEquals(0, result.getResults().size()); }
@Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<WeakCipherEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> weakCiphers = getWeakCiphersInSession(session); for(String weakCipher : weakCiphers) { entries.add(populateEntry(session, weakCipher)); } } return getTestResult(entries); }
WeakCipherImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<WeakCipherEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> weakCiphers = getWeakCiphersInSession(session); for(String weakCipher : weakCiphers) { entries.add(populateEntry(session, weakCipher)); } } return getTestResult(entries); } }
WeakCipherImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<WeakCipherEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> weakCiphers = getWeakCiphersInSession(session); for(String weakCipher : weakCiphers) { entries.add(populateEntry(session, weakCipher)); } } return getTestResult(entries); }  }
WeakCipherImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<WeakCipherEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> weakCiphers = getWeakCiphersInSession(session); for(String weakCipher : weakCiphers) { entries.add(populateEntry(session, weakCipher)); } } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata); }
WeakCipherImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<WeakCipherEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> weakCiphers = getWeakCiphersInSession(session); for(String weakCipher : weakCiphers) { entries.add(populateEntry(session, weakCipher)); } } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata);  }