// Path: src/test/java/jigspuzzle/testutils/mockups/DummySelectionGroupSelectable.java
// public class DummySelectionGroupSelectable<T> implements SelectionGroupSelectable<T> {
// 
//     private T value;
// 
//     private SelectionGroup<T> selectionGroup;
// 
//     @Override
//     public T getSelectionValue() {
//         return this.value;
//     }
// 
//     @Override
//     public void setSelectionGroup(SelectionGroup<T> selectionGroup) {
//         this.selectionGroup = selectionGroup;
//     }
// 
//     @Override
//     public void setSelectionValue(T value) {
//         this.value = value;
//     }
// 
// }


import java.util.Arrays;
import java.util.List;
import jigspuzzle.testutils.mockups.DummySelectionGroupSelectable;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
        SelectionGroupSelectable<Integer> object1 = new DummySelectionGroupSelectable<>();
        SelectionGroupSelectable<Integer> object2 = new DummySelectionGroupSelectable<>();

        instance.setOnlyOneValueSelectable(false);
        instance.addToSelectionGroup(object1, 1);
        instance.addToSelectionGroup(object2, 2);
        instance.changeSelectedValue(object1);
        instance.changeSelectedValue(object2);

        List expList = Arrays.asList(1, 2);
        List result = instance.getSelectedValues();
        assertEquals(expList, result);
    }

    @Test
    public void testRemoveFromSelectionGroup() {
        SelectionGroup<Integer> instance = new SelectionGroup<>();
        SelectionGroupSelectable<Integer> object = new DummySelectionGroupSelectable<>();

        instance.addToSelectionGroup(object, 1);
        instance.setSelectedValue(1);
        SelectionGroupSelectable result = instance.removeFromSelectionGroup(object);

        assertFalse(instance.isSelected(object));
        assertEquals(object, result);
    }

    @Test
    public void testSetSelectedValue() {
        SelectionGroup<Integer> instance = new SelectionGroup<>();
// Path: src/test/java/jigspuzzle/testutils/mockups/DummySelectionGroupSelectable.java
// public class DummySelectionGroupSelectable<T> implements SelectionGroupSelectable<T> {
// 
//     private T value;
// 
//     private SelectionGroup<T> selectionGroup;
// 
//     @Override
//     public T getSelectionValue() {
//         return this.value;
//     }
// 
//     @Override
//     public void setSelectionGroup(SelectionGroup<T> selectionGroup) {
//         this.selectionGroup = selectionGroup;
//     }
// 
//     @Override
//     public void setSelectionValue(T value) {
//         this.value = value;
//     }
// 
// }


// Path: src/test/java/jigspuzzle/view/util/SelectionGroupIT.java
import java.util.Arrays;
import java.util.List;
import jigspuzzle.testutils.mockups.DummySelectionGroupSelectable;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

        SelectionGroupSelectable<Integer> object1 = new DummySelectionGroupSelectable<>();
        SelectionGroupSelectable<Integer> object2 = new DummySelectionGroupSelectable<>();

        instance.setOnlyOneValueSelectable(false);
        instance.addToSelectionGroup(object1, 1);
        instance.addToSelectionGroup(object2, 2);
        instance.changeSelectedValue(object1);
        instance.changeSelectedValue(object2);

        List expList = Arrays.asList(1, 2);
        List result = instance.getSelectedValues();
        assertEquals(expList, result);
    }

    @Test
    public void testRemoveFromSelectionGroup() {
        SelectionGroup<Integer> instance = new SelectionGroup<>();
        SelectionGroupSelectable<Integer> object = new DummySelectionGroupSelectable<>();

        instance.addToSelectionGroup(object, 1);
        instance.setSelectedValue(1);
        SelectionGroupSelectable result = instance.removeFromSelectionGroup(object);

        assertFalse(instance.isSelected(object));
        assertEquals(object, result);
    }

    @Test
    public void testSetSelectedValue() {
        SelectionGroup<Integer> instance = new SelectionGroup<>();
        SelectionGroupSelectable<Integer> object = new DummySelectionGroupSelectable<>();