assertEquals("SSLv3", ProtocolVersion.getByName("SSLv3").name);
assertEquals("TLSv1", ProtocolVersion.getByName("TLSv1").name);
}
public void testGetLatestVersion() {
ProtocolVersion ver = ProtocolVersion.getLatestVersion(new String[] {
"SSLv2", "TLSv1", "SSLv3" });
assertEquals("Incorrect protocol version", "TLSv1", ver.name);
ver = ProtocolVersion.getLatestVersion(new String[] {"SSLv3",
"unknown", "SSLv2" });