public void testAllowedMarkers() throws IOException { assertEquals( function.apply("-----BEGIN CERTIFICATE-----"), "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t"); assertEquals(function.apply("ssh-rsa"), "c3NoLXJzYQ=="); assertEquals( function.apply("---- BEGIN SSH2 PUBLIC KEY ----"), "LS0tLSBCRUdJTiBTU0gyIFBVQkxJQyBLRVkgLS0tLQ=="); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testDisallowedMarkersIllegalArgument() throws IOException { function.apply("ssh-dsa"); }