public static Set<String> assertValidCipherSuites(Set<String> expected,String[] cipherSuites){
  assertNotNull(cipherSuites);
  assertTrue(cipherSuites.length != 0);
  Set remainingCipherSuites=new HashSet<String>(expected);
  Set unknownCipherSuites=new HashSet<String>();
  for (  String cipherSuite : cipherSuites) {
    boolean removed=remainingCipherSuites.remove(cipherSuite);
    if (!removed) {
      unknownCipherSuites.add(cipherSuite);
    }
  }
  assertEquals("Unknown cipher suites",Collections.EMPTY_SET,unknownCipherSuites);
  return remainingCipherSuites;
}

public static Set < String > assertValidCipherSuites ( Set < String > expected , String [ ] cipherSuites ) { assertNotNull ( cipherSuites ) ; assertTrue ( cipherSuites . length != 0 ) ; Set remainingCipherSuites = new HashSet < String > ( expected ) ; Set unknownCipherSuites = new HashSet < String > ( ) ; for ( String cipherSuite : cipherSuites ) { boolean removed = remainingCipherSuites . remove ( cipherSuite ) ; if ( ! removed ) { unknownCipherSuites . add ( cipherSuite ) ; } } assertEquals ( "Unknown cipher suites" , Collections . EMPTY_SET , unknownCipherSuites ) ; return remainingCipherSuites ; }
asserts that the cipher suites array is non - null and that it all of its contents are cipher suites known to this implementation . as a convenience , returns any unenabled cipher suites in a test for those that want to verify separately that all cipher suites were included .
