// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Arguments.java
// public class Arguments {
// 
// 	public static void ensureNotNull(Object value, String format, Object... args) {
// 		ensureNotNull(value, String.format(format, args));
// 	}
// 
// 	public static void ensureNotNull(Object value, String message) {
// 		if (value == null) {
// 			throw new IllegalArgumentException(message);
// 		}
// 	}
// 
// 	public static void ensureTrue(boolean condition, String format, Object... args) {
// 		if (!condition) {
// 			throw new IllegalArgumentException(String.format(format, args));
// 		}
// 	}
// }
// 
// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Expectations.java
// public static void expectNotNull(Object value, String message) {
// 	if (value == null) {
// 		fail(message);
// 	}
// }
// 
// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Expectations.java
// public static void expectTrue(boolean condition, String message) {
// 	if (!condition) {
// 		fail(message);
// 	}
// }


import java.util.Map;
import com.mscharhag.oleaster.matcher.util.Arguments;
import static com.mscharhag.oleaster.matcher.util.Expectations.expectNotNull;
import static com.mscharhag.oleaster.matcher.util.Expectations.expectTrue;
package com.mscharhag.oleaster.matcher.matchers;




/**
 * Matcher class to validate {@link Map}s
 */
public class MapMatcher<K, V> extends ObjectMatcher<Map<K, V>> {

	public MapMatcher(final Map<K, V> value) {
		super(value);
	}

    /**
     * Checks if the stored {@code Map} is empty.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} is not empty</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
     */
	public void toBeEmpty() {
	    expectNotNull(this.getValue(), "Expected null to be empty");
	    expectTrue(this.getValue().isEmpty(), "Expected '%s' to be empty", this.getValue());
	}

    /**
     * Checks if the stored {@code Map} is not empty.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} is empty</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
     */
	public void toNotBeEmpty() {
        expectNotNull(this.getValue(), "Expected null to not be empty");
		expectTrue(!this.getValue().isEmpty(), "Expected '%s' to not be empty", this.getValue());
	}

    /**
     * Checks if the stored {@code Map} contains the given {@code key}.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} does not contain the given {@code key}</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
	 * @param key the expected key
     */
	public void toContainKey(final K key) {
        expectNotNull(this.getValue(), "Expected null to contain the key '%s'", key);
// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Arguments.java
// public class Arguments {
// 
// 	public static void ensureNotNull(Object value, String format, Object... args) {
// 		ensureNotNull(value, String.format(format, args));
// 	}
// 
// 	public static void ensureNotNull(Object value, String message) {
// 		if (value == null) {
// 			throw new IllegalArgumentException(message);
// 		}
// 	}
// 
// 	public static void ensureTrue(boolean condition, String format, Object... args) {
// 		if (!condition) {
// 			throw new IllegalArgumentException(String.format(format, args));
// 		}
// 	}
// }
// 
// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Expectations.java
// public static void expectNotNull(Object value, String message) {
// 	if (value == null) {
// 		fail(message);
// 	}
// }
// 
// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/util/Expectations.java
// public static void expectTrue(boolean condition, String message) {
// 	if (!condition) {
// 		fail(message);
// 	}
// }


// Path: oleaster-matcher/src/main/java/com/mscharhag/oleaster/matcher/matchers/MapMatcher.java
import java.util.Map;
import com.mscharhag.oleaster.matcher.util.Arguments;
import static com.mscharhag.oleaster.matcher.util.Expectations.expectNotNull;
import static com.mscharhag.oleaster.matcher.util.Expectations.expectTrue;

package com.mscharhag.oleaster.matcher.matchers;




/**
 * Matcher class to validate {@link Map}s
 */
public class MapMatcher<K, V> extends ObjectMatcher<Map<K, V>> {

	public MapMatcher(final Map<K, V> value) {
		super(value);
	}

    /**
     * Checks if the stored {@code Map} is empty.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} is not empty</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
     */
	public void toBeEmpty() {
	    expectNotNull(this.getValue(), "Expected null to be empty");
	    expectTrue(this.getValue().isEmpty(), "Expected '%s' to be empty", this.getValue());
	}

    /**
     * Checks if the stored {@code Map} is not empty.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} is empty</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
     */
	public void toNotBeEmpty() {
        expectNotNull(this.getValue(), "Expected null to not be empty");
		expectTrue(!this.getValue().isEmpty(), "Expected '%s' to not be empty", this.getValue());
	}

    /**
     * Checks if the stored {@code Map} contains the given {@code key}.
     * <p>This method throws an {@code AssertionError} if
     * <ul>
     *     <li>the stored {@code Map} does not contain the given {@code key}</li>
     *     <li>the stored {@code Map} is {@code null}</li>
     * </ul>
	 * @param key the expected key
     */
	public void toContainKey(final K key) {
        expectNotNull(this.getValue(), "Expected null to contain the key '%s'", key);
		expectTrue(this.getValue().containsKey(key), "Expected '%s' to contain key '%s'", this.getValue(), key);