@Test
public void testDecodeInvalidData() {

    try {
        YBase64.decode(null);
        fail();
    } catch (NullPointerException ignored) {
    }
    
    try {
        YBase64.decode("abcde\0".getBytes());
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        YBase64.decode("a-aa".getBytes());
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        byte[] a = new byte[] {(byte)0xff,(byte)0x97,(byte)0x97,(byte)0x97};
        YBase64.decode(a);
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        byte[] b = new byte[] {(byte)0x97,(byte)0xff,(byte)0x97,(byte)0x97};
        YBase64.decode(b);
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        byte[] c = new byte[] {(byte)0x97,(byte)0x97,(byte)0xff,(byte)0x97};
        YBase64.decode(c);
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        byte[] d = new byte[] {(byte)0x97,(byte)0x97,(byte)0x97,(byte)0xff};
        YBase64.decode(d);
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        YBase64.decode("aaa-".getBytes());
        fail();
    } catch (CryptoException ignored) {
    }
    
    try {
        YBase64.decode("aa--".getBytes());
        fail();
    } catch (CryptoException ignored) {
    }
}