// 断言 列表是空的
assertThat(newArrayList()).isEmpty();
// 断言 列表的开始 结束元素
assertThat(newArrayList...("a", "b", "c")).containsOnlyOnce("a");
}
@Test
void testMap() {
Map foo = ImmutableMap.of...("A", 1, "B", 2, "C", 3);
// 断言 map 不为空 size
assertThat(foo).isNotEmpty().hasSize(3);
//...断言 map 包含元素
assertThat(foo).contains(entry("A", 1), entry("B", 2));
// 断言 map 包含key
assertThat...(foo).containsKeys("A", "B", "C");
// 断言 map 包含value
assertThat(foo).containsValue(3);
}
// 其他断言