func (_m *Plugin) GetGroupByHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Group, error) {
	ret := _m.Called(ctx, hash)
	var r0 *fftypes.Group
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) *fftypes.Group); ok {
		r0 = rf(ctx, hash)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Group)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok {
		r1 = rf(ctx, hash)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
GetGroupByHash provides a mock function with given fields: ctx, hash
package databasemocks
import (
	context "context"
	config "github.com/hyperledger/firefly/internal/config"
	database "github.com/hyperledger/firefly/pkg/database"
	fftypes "github.com/hyperledger/firefly/pkg/fftypes"
	mock "github.com/stretchr/testify/mock"
)
type Plugin struct {
	mock.Mock
}
func (_m *Plugin) AddTokenAccountBalance(ctx context.Context, account *fftypes.TokenBalanceChange) error {
	ret := _m.Called(ctx, account)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.TokenBalanceChange) error); ok {
		r0 = rf(ctx, account)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) Capabilities() *database.Capabilities {
	ret := _m.Called()
	var r0 *database.Capabilities
	if rf, ok := ret.Get(0).(func() *database.Capabilities); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*database.Capabilities)
		}
	}
	return r0
}
func (_m *Plugin) DeleteBlob(ctx context.Context, sequence int64) error {
	ret := _m.Called(ctx, sequence)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
		r0 = rf(ctx, sequence)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteConfigRecord(ctx context.Context, key string) error {
	ret := _m.Called(ctx, key)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, key)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteNamespace(ctx context.Context, id *fftypes.UUID) error {
	ret := _m.Called(ctx, id)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteNextPin(ctx context.Context, sequence int64) error {
	ret := _m.Called(ctx, sequence)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
		r0 = rf(ctx, sequence)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) error {
	ret := _m.Called(ctx, hash)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) error); ok {
		r0 = rf(ctx, hash)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteOffset(ctx context.Context, t fftypes.FFEnum, name string) error {
	ret := _m.Called(ctx, t, name)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, string) error); ok {
		r0 = rf(ctx, t, name)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeletePin(ctx context.Context, sequence int64) error {
	ret := _m.Called(ctx, sequence)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
		r0 = rf(ctx, sequence)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) DeleteSubscriptionByID(ctx context.Context, id *fftypes.UUID) error {
	ret := _m.Called(ctx, id)
	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}
func (_m *Plugin) GetBatchByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Batch, error) {
	ret := _m.Called(ctx, id)
	var r0 *fftypes.Batch
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Batch); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Batch)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetBatches(ctx context.Context, filter database.Filter) ([]*fftypes.Batch, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.Batch
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Batch); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.Batch)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetBlobMatchingHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Blob, error) {
	ret := _m.Called(ctx, hash)
	var r0 *fftypes.Blob
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) *fftypes.Blob); ok {
		r0 = rf(ctx, hash)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Blob)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok {
		r1 = rf(ctx, hash)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetBlobs(ctx context.Context, filter database.Filter) ([]*fftypes.Blob, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.Blob
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Blob); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.Blob)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetConfigRecord(ctx context.Context, key string) (*fftypes.ConfigRecord, error) {
	ret := _m.Called(ctx, key)
	var r0 *fftypes.ConfigRecord
	if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.ConfigRecord); ok {
		r0 = rf(ctx, key)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.ConfigRecord)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, key)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetConfigRecords(ctx context.Context, filter database.Filter) ([]*fftypes.ConfigRecord, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.ConfigRecord
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.ConfigRecord); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.ConfigRecord)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetData(ctx context.Context, filter database.Filter) ([]*fftypes.Data, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.Data
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Data); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.Data)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetDataByID(ctx context.Context, id *fftypes.UUID, withValue bool) (*fftypes.Data, error) {
	ret := _m.Called(ctx, id, withValue)
	var r0 *fftypes.Data
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, bool) *fftypes.Data); ok {
		r0 = rf(ctx, id, withValue)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Data)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID, bool) error); ok {
		r1 = rf(ctx, id, withValue)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetDataRefs(ctx context.Context, filter database.Filter) (fftypes.DataRefs, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 fftypes.DataRefs
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) fftypes.DataRefs); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(fftypes.DataRefs)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetDatatypeByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Datatype, error) {
	ret := _m.Called(ctx, id)
	var r0 *fftypes.Datatype
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Datatype); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Datatype)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetDatatypeByName(ctx context.Context, ns string, name string, version string) (*fftypes.Datatype, error) {
	ret := _m.Called(ctx, ns, name, version)
	var r0 *fftypes.Datatype
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *fftypes.Datatype); ok {
		r0 = rf(ctx, ns, name, version)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Datatype)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = rf(ctx, ns, name, version)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetDatatypes(ctx context.Context, filter database.Filter) ([]*fftypes.Datatype, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.Datatype
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Datatype); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.Datatype)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}
func (_m *Plugin) GetEventByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Event, error) {
	ret := _m.Called(ctx, id)
	var r0 *fftypes.Event
	if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Event); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*fftypes.Event)
		}
	}
	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}
func (_m *Plugin) GetEvents(ctx context.Context, filter database.Filter) ([]*fftypes.Event, *database.FilterResult, error) {
	ret := _m.Called(ctx, filter)
	var r0 []*fftypes.Event
	if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Event); ok {
		r0 = rf(ctx, filter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*fftypes.Event)
		}
	}
	var r1 *database.FilterResult
	if rf, ok := ret.Get(1).(func(context.Context, database.Filter) *database.FilterResult); ok {
		r1 = rf(ctx, filter)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*database.FilterResult)
		}
	}
	var r2 error
	if rf, ok := ret.Get(2).(func(context.Context, database.Filter) error); ok {
		r2 = rf(ctx, filter)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}