func (m *Mock) Create(newResource Resource) (Resource, error) {
	if err := checkResourceKeyExists(m.data, m.key); err != nil {
		return nil, ErrResourceNotFound
	}
	_, ok := newResource["id"]
	if !ok {
		newResource["id"] = generateNewId(m.data[m.key])
	} else {
		for _, resource := range m.data[m.key] {
			if resource["id"] == newResource["id"] {
				return nil, ErrResourceAlreadyExists
			}
		}
	}
	newData := append(m.data[m.key], newResource)
	m.data[m.key] = newData
	return newResource, nil
}
Create a new mock resource for the specific key.
package storage
type Mock struct {
	data Database
	key  string
}
func NewMock(data Database, key string) (*Mock, error) {
	return &Mock{data: data, key: key}, nil
}
func (m *Mock) Find() ([]Resource, error) {
	return m.data[m.key], nil
}
func (m *Mock) FindById(id string) (Resource, error) {
	if err := checkResourceKeyExists(m.data, m.key); err != nil {
		return nil, ErrResourceNotFound
	}
	for _, resource := range m.data[m.key] {
		if resource["id"] == id {
			return resource, nil
		}
	}
	return nil, ErrResourceNotFound
}