### Question:
Assert { public static void hasSize(Collection<?> values, int expectedSize) { hasSize(values, expectedSize, () -> "Expected " + values + " to have size " + expectedSize + " but got " + values.size() + " elements"); }  static void isEmpty(Collection<?> values); static void isEmpty(Collection<?> values, Supplier<String> messageSupplier); static void notEmpty(Collection<?> values); static void hasSize(Collection<?> values, int expectedSize); static void hasSize(Collection<?> values, int expectedSize, Supplier<String> messageSupplier); static void notEmpty(Collection<?> values, Supplier<String> messageSupplier); static void equals(T one, T other); static void equals(long one, long other); static void equals(T one, T other, Supplier<String> messageSupplier); static void equals(long one, long other, Supplier<String> messageSupplier); static void isTrue(boolean value, Supplier<String> messageSupplier); static void isFalse(boolean value, Supplier<String> messageSupplier); static void isNull(Object value); static void isNull(Object value, Supplier<String> messageSupplier); static void notNull(Object value); static void notNull(Object value, Supplier<String> messageSupplier); static void startsWith(String string, String requiredPrefix); static void startsWith(String string, String requiredPrefix, Supplier<String> messageSupplier); static void doesNotStartWith(String string, String forbiddenPrefix); static void doesNotStartWith(String string, String forbiddenPrefix, Supplier<String> messageSupplier); static void notNullOrEmpty(String string); static void notNullOrEmpty(String string, Supplier<String> messageSupplier);  }### Answer:
@Test void testHasSize() throws Exception { Assert.hasSize(Arrays.asList("a", "b", "c"), 3); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Assert.hasSize(Collections.emptySet(), 1)) .withMessage("Expected [] to have size 1 but got 0 elements"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> Assert.hasSize(Collections.emptySet(), 1, () -> "some message")) .withMessage("some message"); }