OadrXMLSignatureHandler { public static String sign(Object oadrObject, PrivateKey privateKey, X509Certificate certificate, String nonce, Long createdtimestamp) throws Oadr20bXMLSignatureException { if (createdtimestamp < 0) { throw new Oadr20bXMLSignatureException("createdtimestamp must be positive"); } return sign(Oadr20bFactory.createOadrPayload(SIGNEDOBJECT_PAYLOAD_ID, oadrObject), privateKey, certificate, nonce, createdtimestamp); } private  OadrXMLSignatureHandler(); static void validate(String raw, OadrPayload payload, long nowDate, long millisecondAcceptedDelay); static String sign(Object oadrObject, PrivateKey privateKey, X509Certificate certificate, String nonce,
			Long createdtimestamp); static final String RSA_SHA256_ALGORITHM; static final String ECDSA_SHA256_ALGORITHM; }
@Test public void testInvalidSign() { boolean exception = false; try { OadrXMLSignatureHandler.sign("moauiccool", privateKey, certificate, NONCE, 0L); } catch (Oadr20bXMLSignatureException e) { exception = true; } assertTrue(exception); }