record RequestDispatcher(BreaksUnit breaksUnit, EngineUnit engineUnit) {
    void dispatch(String command) {
        switch (command.toLowerCase()) {
            case "silnik" -> engineUnit.start();
            case "hamulce" -> breaksUnit.activate();
            default -> throw new IllegalArgumentException("nie zaimplementowano: " + command);
        }
    }
}
