@Test public void testWriteBase64() { final ByteArrayOutputStream os = new ByteArrayOutputStream(); try { node.writeBase64(os); assertEquals(701, os.toByteArray().length); } catch (final IOException e) { fail("IOException not expected: " + e.getMessage()); } }
@Test public void testFromBase64() { final ByteArrayOutputStream os = new ByteArrayOutputStream(); try { node.writeBase64(os); ModelNode newNode = ModelNode.fromBase64(new ByteArrayInputStream(os.toByteArray())); assertNotNull(newNode); assertEquals(node, newNode); } catch (final IOException e) { fail("IOException not expected: " + e.getMessage()); } }