void () { List<Object> list = getList(); Assertions.assertThat(list).hasSizeBetween(1, 10); if (<warning descr="Condition 'list.size() >= 1 && list.size() <= 10' is always 'true'"><warning descr="Condition 'list.size() >= 1' is always 'true'">list.size() >= 1</warning> && <warning descr="Condition 'list.size() <= 10' is always 'true' when reached">list.size() <= 10</warning></warning>) {} Assertions.assertThat(list).hasSizeGreaterThan(2); if (<warning descr="Condition 'list.size() >= 3 && list.size() <= 10' is always 'true'"><warning descr="Condition 'list.size() >= 3' is always 'true'">list.size() >= 3</warning> && <warning descr="Condition 'list.size() <= 10' is always 'true' when reached">list.size() <= 10</warning></warning>) {} Assertions.assertThat(list).hasSizeGreaterThanOrEqualTo(4); if (<warning descr="Condition 'list.size() >= 4 && list.size() <= 10' is always 'true'"><warning descr="Condition 'list.size() >= 4' is always 'true'">list.size() >= 4</warning> && <warning descr="Condition 'list.size() <= 10' is always 'true' when reached">list.size() <= 10</warning></warning>) {} Assertions.assertThat(list).hasSizeLessThan(9); if (<warning descr="Condition 'list.size() >= 3 && list.size() <= 8' is always 'true'"><warning descr="Condition 'list.size() >= 3' is always 'true'">list.size() >= 3</warning> && <warning descr="Condition 'list.size() <= 8' is always 'true' when reached">list.size() <= 8</warning></warning>) {} Assertions.assertThat(list).hasSizeLessThanOrEqualTo(7); if (<warning descr="Condition 'list.size() >= 3 && list.size() <= 7' is always 'true'"><warning descr="Condition 'list.size() >= 3' is always 'true'">list.size() >= 3</warning> && <warning descr="Condition 'list.size() <= 7' is always 'true' when reached">list.size() <= 7</warning></warning>) {} Assertions.assertThat(list).hasSize(5); if (<warning descr="Condition 'list.size() == 5' is always 'true'">list.size() == 5</warning>) {} }