### Question:
MapCondition extends BasicCondition<T, MapCondition<T, K, V>> implements MapChecks<T, K, V, MapCondition<T, K, V>> { @Override public MapCondition<T, K, V> hasSizeLessThan(int maxSizeExclusive) { require(this.subject).isNotNull(); if (!(this.subject.size() < maxSizeExclusive)) { DbcAssertionError.throwNew(new IllegalStateException("Expected map size to be less than <" + maxSizeExclusive + "> but was <" + this.subject.size() + ">"), this.message); } return result(); } MapCondition(T subject); @Override MapCondition<T, K, V> isNotEmpty(); @Override MapCondition<T, K, V> hasSize(int size); @Override MapCondition<T, K, V> hasSizeBetween(int startInclusive, int endInclusive); @Override MapCondition<T, K, V> containsKey(K key); @Override MapCondition<T, K, V> containsValue(V value); @Override MapCondition<T, K, V> hasSizeGreaterThan(int minSizeExclusive); @Override MapCondition<T, K, V> hasSizeGreaterThanOrEqual(int minSize); @Override MapCondition<T, K, V> hasSizeLessThan(int maxSizeExclusive); @Override MapCondition<T, K, V> hasSizeLessThanOrEqual(int maxSize);  }### Answer:
@Test public void hasSizeLessThan() throws Exception { MapCondition<Map<String, String>, String, String> condition = new MapCondition<>(this.input); condition.hasSizeLessThan(4); Assertions.assertThatThrownBy(() -> condition.hasSizeLessThan(2)) .isInstanceOf(DbcAssertionError.class) .hasCauseInstanceOf(IllegalStateException.class); }