Coffee machine that adds condiments dynamically
I would remove the name field entirely, and instead inline it into the getName() method.
That way you can implement the getName() similar to how you implemented getCost().

Concretely this means your getName() method from Beverage becomes abstract just like the other abstract classes.

public abstract String getName();


The base beverage (HouseBlend) then implements the method as:

public String getName() {
    return "HouseBlend";
}


And similarly the decorator classes implement it as such:

public String getName() {
    return "Milk-flavored " + beverage.getName();
}


You can fill in the implementation for the other decorators.