Immutable collections can be constructed with a set of singleton* methods: sinleton for a Set, singletonMap for a Map and singletonList for a List:
@Test
public void should_correctly_create_singleton_list() {
List<String> oneLetterList = Collections.singletonList("A");
assertThat(oneLetterList.get(0)).isEqualTo("A");
assertThat(oneLetterList).hasSize(1);
}
@Test(expected = UnsupportedOperationException.class)
public void should_correctly_create_singleton_list_and_assert_that_it_s_not_mutable() {
Map<String, String> oneLetterMap = Collections.singletonMap("A", "Letter A");
oneLetterMap.put("B", "Letter B");
}