@Test
public void testNullAndEmptyString() throws Exception {

  Signer signer = new Signer(createStringSignerSecretProvider());
  try {
    signer.sign(null);
    Assert.fail();
  } catch (IllegalArgumentException ex) {
    // Expected
  } catch (Throwable ex) {
    Assert.fail();
  }
  try {
    signer.sign("");
    Assert.fail();
  } catch (IllegalArgumentException ex) {
    // Expected
  } catch (Throwable ex) {
    Assert.fail();
  }
}