### Question:
CloneManagerImpl implements CloneManager { @Override public <T> T clone(T source, ClonePolicy policy) { return cloneProcess(policy).clone(source); } CloneManagerImpl(); @Inject  CloneManagerImpl(IDeepCloneProcess deepCloneProcess, DefaultCloneProcess defaultCloneProcess, NoneCloneProcess noneCloneProcess); @Override T clone(T source, ClonePolicy policy); @Override T clone(S source, T target, ClonePolicy policy);  }### Answer:
@Test public void testClone() throws Exception { cloneManager.clone(def1, ClonePolicy.ALL); verify(deepCloneProcess, times(1)).clone(def1); cloneManager.clone(def1, ClonePolicy.DEFAULT); verify(defaultCloneProcess, times(1)).clone(def1); cloneManager.clone(def1, ClonePolicy.NONE); verify(noneCloneProcess, times(1)).clone(def1); }
@Test(expected = NullPointerException.class) public void testCloneNullPolicy() { cloneManager.clone(def1, null); }
@Test public void testCloneParam() throws Exception { cloneManager.clone(def1, def2, ClonePolicy.ALL); verify(deepCloneProcess, times(1)).clone(def1, def2); cloneManager.clone(def1, def2, ClonePolicy.DEFAULT); verify(defaultCloneProcess, times(1)).clone(def1, def2); cloneManager.clone(def1, def2, ClonePolicy.NONE); verify(noneCloneProcess, times(1)).clone(def1, def2); }