@Test public void deserialize() { GameServerMapper gameServerMapper = new GameServerMapper( new StandardServerMapper() ); Server server = new Server("name", true, 10, 100); GameServer gameServer = new GameServer( server, "Map", "GameName", true ); Map<String, String> serialize = gameServerMapper.serialize(gameServer); GameServer deSerialized = gameServerMapper.deserialize(serialize); assertEquals(deSerialized, gameServer); }
@Override public GameServer deserialize(Map<String, String> data) { return new GameServer( delegateMapper.deserialize(data), data.get("map"), data.get("gameName"), Boolean.valueOf(data.get("active")) ); }
GameServerMapper implements ServerMapper<GameServer> { @Override public GameServer deserialize(Map<String, String> data) { return new GameServer( delegateMapper.deserialize(data), data.get("map"), data.get("gameName"), Boolean.valueOf(data.get("active")) ); } }
GameServerMapper implements ServerMapper<GameServer> { @Override public GameServer deserialize(Map<String, String> data) { return new GameServer( delegateMapper.deserialize(data), data.get("map"), data.get("gameName"), Boolean.valueOf(data.get("active")) ); }  }
GameServerMapper implements ServerMapper<GameServer> { @Override public GameServer deserialize(Map<String, String> data) { return new GameServer( delegateMapper.deserialize(data), data.get("map"), data.get("gameName"), Boolean.valueOf(data.get("active")) ); }  @Override GameServer deserialize(Map<String, String> data); @Override Map<String, String> serialize(GameServer server); }
GameServerMapper implements ServerMapper<GameServer> { @Override public GameServer deserialize(Map<String, String> data) { return new GameServer( delegateMapper.deserialize(data), data.get("map"), data.get("gameName"), Boolean.valueOf(data.get("active")) ); }  @Override GameServer deserialize(Map<String, String> data); @Override Map<String, String> serialize(GameServer server);  }