private BrewAction mapStep(JsonObject step) {
        switch (step.getString("type").toLowerCase()) {
            case "addingredient":
                return new AddIngredient(unmarshalIngredient(step.getJsonObject("ingredient")));
            case "changetemperature":
                return new ChangeTemperature(unmarshalTemperature(step.getJsonObject("temperature")));
            case "keeptemperaturestable":
                return new KeepTemperatureStable(unmarshalDuration(step.getJsonObject("duration")));
            default:
                throw new IllegalArgumentException(step.getString("type") + " is not a valid recipe step");
        }
    }