@@ -0,0 +1,778 @@
+package ru.matevosyan;%0A%0Aimport org.junit.Test;%0Aimport ru.matevosyan.CycleDetection.Node;%0A%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Created by %D0%9F%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8C on 26.05.2017.%0A */%0Apublic class CycleDetectionTest %7B%0A%0A    @Test%0A    public void WhenCreateCycleListThanDetectIt() %7B%0A%0A        CycleDetection%3CInteger%3E cycleDetection = new CycleDetection%3C%3E();%0A%0A        Node%3CInteger%3E first = new Node%3C%3E(1);%0A        Node%3CInteger%3E two = new Node%3C%3E(2);%0A        Node%3CInteger%3E third = new Node%3C%3E(3);%0A        Node%3CInteger%3E four = new Node%3C%3E(4);%0A%0A        first.next = two;%0A        two.next = third;%0A        third.next = four;%0A        four.next = first;%0A%0A        boolean hasCycle = cycleDetection.hasCycle(first);%0A%0A        assertThat(hasCycle, is(true));%0A    %7D%0A%7D

add CycleDetectionTest.java