Collection<Attachment> attachments = resMsg.getAttachments();
assertNotNull(attachments);
assertEquals(1, attachments.size());
Attachment inAtt = attachments.iterator().next();
ByteArrayOutputStream out = new ByteArrayOutputStream();
IOUtils.copy(inAtt.getDataHandler().getInputStream(), out);
out.close();
assertTrue("Wrong size: " + out.size()
+ "\n" + out.toString(),
out.size() > 970 && out.size() < 1020);
unregisterServStatic("http://localhost:" + PORT + "/policy.xsd");