func (m *FakeMarketplace) Stop() error {
	if m.Server == nil {
		return errors.New("Cannot not stop a server that has not started")
	}
	return m.Server.Close()
}
Stop the server or return an error if it couldn't be stopped
package marketplace
import (
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"strconv"
	"github.com/go-zoo/bone"
	"github.com/manifoldco/grafton"
	"github.com/manifoldco/grafton/connector"
	"github.com/manifoldco/grafton/db"
	"github.com/manifoldco/grafton/marketplace/primitives"
	"github.com/manifoldco/grafton/marketplace/routes"
)
type FakeMarketplace struct {
	Port      uint
	Product   *primitives.FakeProductData
	DB        *db.DB
	Connector *connector.FakeConnector
	GC        *grafton.Client
	Server    *http.Server
}
func New(connector *connector.FakeConnector, port uint, pAPI *url.URL,
	signer grafton.Signer, data *primitives.FakeProductData) *FakeMarketplace {
	fm := &FakeMarketplace{
		Port:      port,
		Product:   data,
		DB:        connector.DB,
		Connector: connector,
	}
	cURL, err := url.Parse("http://localhost:" + strconv.Itoa(int(connector.Config.Port)))
	if err != nil {
		panic("Failed to parse connector url for Grafton client: " + err.Error())
	}
	fm.GC = grafton.New(pAPI, cURL, signer, nil)
	return fm
}
func (m *FakeMarketplace) StartSync() error {
	m.Server = &http.Server{
		Addr:    fmt.Sprintf("localhost:%d", m.Port),
		Handler: Routes(m),
	}
	return m.Server.ListenAndServe()
}
func (m *FakeMarketplace) Start() {
	m.Server = &http.Server{
		Addr:    fmt.Sprintf("localhost:%d", m.Port),
		Handler: Routes(m),
	}
	go m.Server.ListenAndServe()
}