### Question:
TransformerExtractor implements Instrumentation { @Override public void addTransformer(ClassFileTransformer transformer, boolean canRetransform) { transformers.add(transformer); } TransformerExtractor(Instrumentation delegate); @Override void addTransformer(ClassFileTransformer transformer, boolean canRetransform); @Override void addTransformer(ClassFileTransformer transformer); @Override boolean isRetransformClassesSupported(); @Override boolean isRedefineClassesSupported(); @Override void appendToBootstrapClassLoaderSearch(JarFile jarfile);  }### Answer:
@Test public void testAddTransformerWorks(){ ClassFileTransformer classFileTransformer = Mockito.mock(ClassFileTransformer.class); Instrumentation delegate = Mockito.mock(Instrumentation.class); TransformerExtractor extractor = new TransformerExtractor(delegate); extractor.addTransformer(classFileTransformer); extractor.addTransformer(classFileTransformer); extractor.addTransformer(classFileTransformer); Assert.assertEquals(3, TransformerExtractor.getTransformers().size()); }