public class AddToRepositoryMojoTest extends AddToRepositoryMojo {
@SuppressWarnings("rawtypes")
public AddToRepositoryMojoTest() throws NoSuchFieldException, IllegalAccessException {
factory = new DefaultArtifactFactory();
ArtifactHandlerManager artifactHandlerManager = new DefaultArtifactHandlerManager();
Field f = factory.getClass().getDeclaredField("artifactHandlerManager");
f.setAccessible(true);
f.set(factory, artifactHandlerManager);
f.setAccessible(false);
f = artifactHandlerManager.getClass().getDeclaredField("artifactHandlers");
f.setAccessible(true);
f.set(artifactHandlerManager, new HashMap());
f.setAccessible(false);
}