public class Logic {
    public final static String STICK = "0";
    public final static String MESSAGE_CODE = "M";

    public String parseToCustomer(String commandFromDrinkMaker) {
        String[] commands = commandFromDrinkMaker.split(":");

        if(commands.length == 2 && MESSAGE_CODE.equals(commands[0])) {
            return commands[1];
        }

        return "";
    }

    public String parseToDrinkMakerProtocol(Drink drink, int nbOfSugars) {
        return drink.getCode()
                + ":" + sugarCode(nbOfSugars)
                + ":" + stickCode(nbOfSugars);
    }

    private String sugarCode(int nbOfSugars) {
        return hasSugars(nbOfSugars)? String.valueOf(nbOfSugars) : "";
    }

    private String stickCode(int nbOfSugars) {
        return hasSugars(nbOfSugars)? STICK : "";
    }

    private boolean hasSugars(int nbOfSugars) {
        return nbOfSugars > 0;
    }

    public String makeDrink(Drink drink, int nbOfSugars, double amountOfMoneyGiven) {
        if(amountOfMoneyGiven >= drink.getPrice()) {
            return parseToDrinkMakerProtocol(drink, nbOfSugars);
        }

        return "Need " + String.valueOf(drink.getPrice() - amountOfMoneyGiven);
    }
}

@@ -110,16 +110,282 @@
 = %22M%22;%0A%0A
+    public String makeDrink(Drink drink, int nbOfSugars, double amount) %7B%0A        if(amount %3E= drink.getPrice()) %7B%0A            return parseToDrinkMakerProtocol(drink, nbOfSugars);%0A        %7D%0A%0A        return %22Need %22 + String.valueOf(drink.getPrice() - amount);%0A    %7D%0A%0A
     publ
@@ -1168,309 +1168,7 @@
    %7D
-%0A%0A    public String makeDrink(Drink drink, int nbOfSugars, double amountOfMoneyGiven) %7B%0A        if(amountOfMoneyGiven %3E= drink.getPrice()) %7B%0A            return parseToDrinkMakerProtocol(drink, nbOfSugars);%0A        %7D%0A%0A        return %22Need %22 + String.valueOf(drink.getPrice() - amountOfMoneyGiven);%0A    %7D
 %0A%7D%0A

Change order of 'makeDrinks' function in order to have a better readability