/** * CcBase64 can encode and decode. * * @throws IOException If some problem inside */ @Test public void encodesAndDecodes() throws IOException { final String urn = "urn:test:Hello World!"; final Map<String, String> properties = ImmutableMap.of("userName", "user"); final Codec codec = new CcBase64(new CcPlain()); final Identity expected = codec.decode(codec.encode(new Identity.Simple(urn, properties))); MatcherAssert.assertThat(expected.urn(), Matchers.equalTo(urn)); MatcherAssert.assertThat(expected.properties(), Matchers.equalTo(properties)); }