@Test public void testClone() throws Exception { setSessionVariableMetaSpy.setFieldName(new String[] {"1"}); setSessionVariableMetaSpy.setVariableName(new String[] {"2"}); setSessionVariableMetaSpy.setDefaultValue(new String[] {"3"}); SetSessionVariableMeta clone = (SetSessionVariableMeta) setSessionVariableMetaSpy.clone(); doReturn(clone).when(setSessionVariableMetaSpy).clone(); verify(clone, times(1)).allocate(1); }