happyPathTest(uri);
}
private static void happyPathTest(URI uri) throws Exception {
Resources resources = new MappingConfig().getServer();
// Place the order
System.out.println(String.format("About to start happy path test. Placing order at [%s] via POST", uri.toString()));
Order order = createOrder();
order = resources.entryAt(uri).post(order);
System.out.println(String.format("Order placed at [%s]", order.getSelfUri()));
// Pay for the order
Payment payment = new Payment("12345677878", "guilherme silveira", 12, 2999, order.getCost());