@Override
	public void handleCommand(CreateGameMatchCommand command) {
		
		if (command == null) {
			throw new IllegalArgumentException("Command can't be null.");
		}
		
		Player player = domainRepository.loadOneBy(Player.class, new PlayerNameSpecification(command.getPlayerName()));
		
		UUID playerId;
		
		if (player == null) {
			
			CreatePlayerCommand createPlayerCommand = new CreatePlayerCommand(UUID.randomUUID(), command.getPlayerName());
			
			messageRouter.routeMessage(createPlayerCommand);
			
			if (createPlayerCommand.hasNotifications()) {
				
			}
			
			if (createPlayerCommand.hasData()) {
				playerId = createPlayerCommand.getDomainData().getPlayerId();
			} else {
				throw new IllegalStateException();
			}
			
		} else {
			playerId = player.getId();
		}
		
		PingPongMatch pingPongMatch = new PingPongMatch(command.getId(), playerId);
		
		domainRepository.add(PingPongMatch.class, pingPongMatch);
		
		command.matchCreated(pingPongMatch.getId());
		
	}