### Question:
ActiveJpaAgent { public static void premain(String args, Instrumentation inst) throws Exception { logger.trace("premain method invoked with args: {} and inst: {}", args, inst); inst.addTransformer(new ModelClassEnhancer(inst).getTransformer(), true); } private  ActiveJpaAgent(); static void premain(String args, Instrumentation inst); static void agentmain(String args, Instrumentation inst);  }### Answer:
@Test public void shouldAddTransformerOnPremain() throws Exception { Instrumentation inst = mock(Instrumentation.class); ActiveJpaAgent.premain("someargs", inst); verify(inst).addTransformer(any(ClassFileTransformer.class), eq(true)); }