@Override
    public Macronutrient calculate(MacroCalculatorAttributes attributes) {
        if(attributes == null || attributes.requiredCalories() == null || attributes.bodyWeightInKg() == null || attributes.gender() == null) {
            return new Macronutrient(BigDecimal.valueOf(0), BigDecimal.valueOf(0), BigDecimal.valueOf(0), BigDecimal.valueOf(0));
        }
        BigDecimal totalProtein = calculateTotalProtein(attributes.bodyWeightInKg(), attributes.gender());
        BigDecimal totalFats = calculateTotalFats(attributes.requiredCalories());
        BigDecimal totalCarbohydrates = calculateCarbohydrates(attributes.requiredCalories(), totalProtein, totalFats);
        return new Macronutrient(attributes.requiredCalories(), totalProtein, totalFats, totalCarbohydrates);
    }
@Test
    void calculate_null() {
        MacroCalculatorAttributes macroCalculatorAttributes1 = new MacroCalculatorAttributes(
                BigDecimal.valueOf(2000), BigDecimal.valueOf(60), null);
        MacroCalculatorAttributes macroCalculatorAttributes2 = new MacroCalculatorAttributes(
                BigDecimal.valueOf(2000), null, Gender.MALE);
        MacroCalculatorAttributes macroCalculatorAttributes3 = new MacroCalculatorAttributes(
                null, BigDecimal.valueOf(60), Gender.MALE);

        Macronutrient macronutrient1 = macroCalculator.calculate(macroCalculatorAttributes1);
        Macronutrient macronutrient2 = macroCalculator.calculate(macroCalculatorAttributes2);
        Macronutrient macronutrient3 = macroCalculator.calculate(macroCalculatorAttributes3);
        Macronutrient macronutrient4 = macroCalculator.calculate(null);

        assertAll("Need to be 0",
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient1.getCalories()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient1.getProteins()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient1.getCarbohydrates()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient1.getFats()));

        assertAll("Need to be 0",
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient2.getCalories()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient2.getProteins()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient2.getCarbohydrates()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient2.getFats()));

        assertAll("Need to be 0",
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient3.getCalories()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient3.getProteins()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient3.getCarbohydrates()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient3.getFats()));

        assertAll("Need to be 0",
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient4.getCalories()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient4.getProteins()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient4.getCarbohydrates()),
                () -> assertEquals(BigDecimal.valueOf(0), macronutrient4.getFats()));


    }