X509DataType x509DataType = sigFactory.createX509DataType();
x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(cert1.getEncoded()));
KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));
KeyBindingType keyBindingType = xKMSObjectFactory.createKeyBindingType();
keyBindingType.setKeyInfo(keyInfoType);
keyBindingType.setId("100123122");
reissueRequestType.setReissueKeyBinding(keyBindingType);
AuthenticationType authenticationType = xKMSObjectFactory.createAuthenticationType();
NotBoundAuthenticationType notBoundAuthenticationType = xKMSObjectFactory.createNotBoundAuthenticationType();
notBoundAuthenticationType.setProtocol("NOTUSED");
notBoundAuthenticationType.setValue("ReissuePassword".getBytes());
authenticationType.setNotBoundAuthentication(notBoundAuthenticationType);
reissueRequestType.setAuthentication(authenticationType);
ReissueResultType reissueResultType = xKMSInvoker.reissue(reissueRequestType, null, null, null, keys1.getPrivate(), keyBindingType.getId());
assertTrue(reissueResultType.getResultMajor().equals(XKMSConstants.RESULTMAJOR_SUCCESS));
assertTrue(reissueResultType.getResultMinor() == null);
assertTrue(reissueResultType.getKeyBinding().size() == 1);
keyBindingType = reissueResultType.getKeyBinding().get(0);
assertTrue(keyBindingType.getStatus().getValidReason().size() == 4);
JAXBElement<X509DataType> jAXBX509Data = (JAXBElement<X509DataType>) keyBindingType.getKeyInfo().getContent().get(0);
assertTrue(jAXBX509Data.getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName().size() == 2);
Iterator<Object> iter2 = jAXBX509Data.getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName().iterator();
while (iter2.hasNext()) {
JAXBElement next = (JAXBElement) iter2.next();
assertTrue(next.getName().getLocalPart().equals("X509Certificate"));