export class BrokerMocked { actions: Record Promise> = {}; services: Map = new Map(); async destroyService(name: string): Promise { this.services.delete(name); } createService(instance: any): void { this.services.set(instance.name, instance); } async call(method: string, data: any): Promise { return this.actions[method](data); } async broadcastToServices(): Promise { // no op } async broadcast(): Promise { // no op } async broadcastLocal(): Promise { // no op } async nodeList(): Promise { // no op } async start(): Promise { // no op } mockServices(actions: Record Promise>) { this.actions = actions; } }