CryptoData { static void verifyCryptoDataString(String input) throws CryptoDataException { if (input.isEmpty() || !input.contains(SEPARATOR)) { throw CryptoDataException.fromCryptoDataString(input); } } private  CryptoData(EncodingProvider encodingProvider, byte[] messageBytes, byte[] ivBytes); private  CryptoData(EncodingProvider encodingProvider, String message, String iv); @Override String toString();  }
@Test(expected = CryptoDataException.class) public void verifyInvalidString() throws Exception { CryptoData.verifyCryptoDataString("123"); }
@Test(expected = CryptoDataException.class) public void verifyEmptyString() throws Exception { CryptoData.verifyCryptoDataString(""); }
@Test(expected = NullPointerException.class) public void verifyNullString() throws Exception { CryptoData.verifyCryptoDataString(null); }