SignatureManipulationHelper { public static void doubleSignature( Document msg, int whichToDouble, int whichToReplace ) { List<Element> signatures = DomUtilities.findChildren( msg, "Signature", NamespaceConstants.URI_NS_DS, true ); Element clone = (Element) signatures.get( whichToDouble ).cloneNode( true ); Element toReplace = signatures.get( whichToReplace ); toReplace.getParentNode().replaceChild( clone, toReplace ); } private  SignatureManipulationHelper(); static void doubleSignature( Document msg, int whichToDouble, int whichToReplace ); static void removeSignature( Document msg, int which );  }
@Test public void testDoubleSignature() { }