import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

import org.junit.Test;



public class Main {

    public static void main(String[] args) {
	// write your code here
    }
    @Test
    public void hashMapTest()
    {
        Map<UUID, UUID> map = new HashMap<>();
        for (int i = 0; i < 10; i++)
        {
            UUID uuid = UUID.randomUUID();
            map.computeIfAbsent(uuid, key ->
            {
                map.put(uuid,uuid);
                return uuid;
            });
        }
        assertThat(map.size(), is(10));
    }
}
