/*
 * Copyright 2015-2018 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v2.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v20.html
 */

package example;

//tag::user_guide[]

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

import example.util.Calculator;

import org.junit.jupiter.api.Test;

class HamcrestAssertionDemo {

	private final Calculator calculator = new Calculator();

	@Test
	void assertWithHamcrestMatcher() {
		assertThat(3, is(equalTo(calculator.subtract(4, 1))));
	}

}
//end::user_guide[]

@@ -327,16 +327,17 @@
 ple;%0A%0A//
+ 
 tag::use
@@ -346,17 +346,16 @@
 guide%5B%5D%0A
-%0A
 import s
@@ -711,22 +711,8 @@
 hat(
-3, is(equalTo(
 calc
@@ -732,16 +732,30 @@
 ct(4, 1)
+, is(equalTo(3
 )));%0A%09%7D%0A
@@ -759,16 +759,17 @@
 %09%7D%0A%0A%7D%0A//
+ 
 end::use

Fix assertion argument order in HamcrestAssertionDemo