package com.macadamian.jbehave_tutorial;

import java.util.HashMap;

public class Machine {
    public Machine() {
    }

    public Product buy(String name, double amount) {
        return new Product(name);
    }
}

@@ -94,118 +94,383 @@
    p
-ublic Machine() %7B%0A    %7D%0A%0A    public Product buy(String name, double amount) %7B%0A        return new Product(name)
+rivate HashMap%3CString, Double%3E _prices = new HashMap%3CString, Double%3E();%0A%0A    public Machine() %7B%0A        _prices.put(%22coke%22, 1.25);%0A        _prices.put(%22fanta%22, 0.75);%0A    %7D%0A%0A    public Product buy(String name, double amount) %7B%0A        if (_prices.containsKey(name) && amount %3E= _prices.get(name)) %7B%0A            return new Product(name);%0A        %7D%0A        %0A        return null
 ;%0A  

fix failures