X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Ftest%2FJU_Base64.java;h=3596619f7e4225b403a09b237ff7df48ee0d08d1;hb=b5985fb5667b3ee9b6a4a0675fb57f55e7a288b7;hp=4d49c9294968ea357900226c800d0ead86b3fccd;hpb=7bc6ef245901a83da234c7765d76a7f7eb34540a;p=aaf%2Fcadi.git diff --git a/core/src/test/java/org/onap/aaf/cadi/test/JU_Base64.java b/core/src/test/java/org/onap/aaf/cadi/test/JU_Base64.java index 4d49c92..3596619 100644 --- a/core/src/test/java/org/onap/aaf/cadi/test/JU_Base64.java +++ b/core/src/test/java/org/onap/aaf/cadi/test/JU_Base64.java @@ -153,4 +153,216 @@ public class JU_Base64 { assertEquals(toEncode,result); } + + @Test + public void test1() throws Exception { + // Test with different Padding + encode("leas", "bGVhcw=="); + encode("leasu", "bGVhc3U="); + encode("leasur", "bGVhc3Vy"); + encode("leasure", "bGVhc3VyZQ=="); + encode("leasure.","bGVhc3VyZS4="); + + // Test with line ends + encode(encoding, expected); + + int ITER = 2000; + System.out.println("Priming by Encoding Base64 " + ITER + " times"); + long start = System.nanoTime(); + for(int i=0;i