type fakeData … func (f *fakeData) Clone() StateData { … } var key … // createCycleStateWithFakeData creates *CycleState with fakeData. // The given data is used in stored fakeData. func createCycleStateWithFakeData(data string, recordPluginMetrics bool) *CycleState { … } // isCycleStateEqual returns whether two CycleState, which has fakeData in storage, is equal or not. // And if they are not equal, returns message which shows why not equal. func isCycleStateEqual(a, b *CycleState) (bool, string) { … } func TestCycleStateClone(t *testing.T) { … }