assertEquals(0,d.getTryCounter());
assertNull(d.getVolatileData());
String xxpk = d.getPk(); // Keep for later so we can set to success
PublisherQueueVolatileData vd = new PublisherQueueVolatileData();
vd.setUsername("foo");
vd.setPassword("bar");
ExtendedInformation ei = new ExtendedInformation();
ei.setSubjectDirectoryAttributes("directoryAttr");
vd.setExtendedInformation(ei);
publisherQueueSession.addQueueData(123456, PublisherConst.PUBLISH_TYPE_CRL, "YY", vd, PublisherConst.STATUS_PENDING);
c = publisherQueueSession.getPendingEntriesForPublisher(123456);
assertEquals(2, c.size());
boolean testedXX = false;
boolean testedYY = false;
i = c.iterator();
while (i.hasNext()) {
d = i.next();
if (d.getFingerprint().equals("XX")) {
assertEquals(PublisherConst.PUBLISH_TYPE_CERT, d.getPublishType());
assertNotNull(d.getLastUpdate());
assertNotNull(d.getTimeCreated());
assertEquals(PublisherConst.STATUS_PENDING, d.getPublishStatus());
assertEquals(0,d.getTryCounter());
testedXX = true;
}
if (d.getFingerprint().equals("YY")) {
assertEquals(PublisherConst.PUBLISH_TYPE_CRL, d.getPublishType());
assertEquals(PublisherConst.STATUS_PENDING, d.getPublishStatus());
assertEquals(0,d.getTryCounter());
PublisherQueueVolatileData v = d.getVolatileData();
assertEquals("bar", v.getPassword());
assertEquals("foo", v.getUsername());
ExtendedInformation e = v.getExtendedInformation();
assertNotNull(e);
assertEquals("directoryAttr", e.getSubjectDirectoryAttributes());
testedYY = true;
}
}