assertArrayEquals(ecKeyControl.getEncoded(), derEncodedKeyValue.getBytesFromTextChild());
}
@org.junit.Test
public void testId() throws Exception {
DEREncodedKeyValue derEncodedKeyValue = new DEREncodedKeyValue(documentBuilder.newDocument(), rsaKeyControl);
assertEquals("", derEncodedKeyValue.getId());
assertNull(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID));
derEncodedKeyValue.setId(idControl);
assertEquals(idControl, derEncodedKeyValue.getId());
assertTrue(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID).isId());
derEncodedKeyValue.setId(null);
assertEquals("", derEncodedKeyValue.getId());
assertNull(derEncodedKeyValue.getElement().getAttributeNodeNS(null, Constants._ATT_ID));
}