export class TestDataManager { private data: Map = new Map(); private version: string = '1.0.0'; setData(key: string, value: any): void { this.data.set(key, value); } getData(key: string): any { return this.data.get(key); } getVersion(): string { return this.version; } setVersion(version: string): void { this.version = version; } export(): string { return JSON.stringify({ version: this.version, data: Object.fromEntries(this.data) }, null, 2); } import(json: string): void { const imported = JSON.parse(json); this.version = imported.version; this.data = new Map(Object.entries(imported.data)); } clear(): void { this.data.clear(); } }