public class Util extends Object
Modifier and Type | Field and Description |
---|---|
static Metadata.Key<Messages.SimpleContext> |
METADATA_KEY |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
assertEquals(List<? extends com.google.protobuf.MessageLite> expected,
List<? extends com.google.protobuf.MessageLite> actual)
Assert that two lists of messages are equal, producing a useful message if not.
|
static void |
assertEquals(com.google.protobuf.MessageLite expected,
com.google.protobuf.MessageLite actual)
Assert that two messages are equal, producing a useful message if not.
|
static SSLSocketFactory |
getSslSocketFactoryForCertainCert(File certChainFile)
Returns a SSLSocketFactory which uses the certificate specified in certChainFile.
|
static File |
loadCert(String name)
Load a file from the resources folder.
|
static int |
pickUnusedPort()
Picks an unused port.
|
public static final Metadata.Key<Messages.SimpleContext> METADATA_KEY
public static int pickUnusedPort()
public static File loadCert(String name) throws IOException
name
- name of a file in src/main/resources/certs.IOException
public static void assertEquals(com.google.protobuf.MessageLite expected, com.google.protobuf.MessageLite actual)
public static void assertEquals(List<? extends com.google.protobuf.MessageLite> expected, List<? extends com.google.protobuf.MessageLite> actual)
public static SSLSocketFactory getSslSocketFactoryForCertainCert(File certChainFile) throws Exception
Exception