Ejemplo n.º 1
0
 @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());
   }
 }
Ejemplo n.º 2
0
 @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());
   }
 }