/** Tests checkWeights(float tolerance) method with accuracy state. */
  public void testCheckWeightsAccuracy2() {
    editor.addGroups(groups);

    Group group3 = new Group(777779, "design method group2", 99.234f);
    editor.addGroup(group3);
    assertFalse("checkWeights is wrong", editor.getScorecard().checkWeights(0));
  }
  /** Tests addGroups(Group[] groups) method with accuracy state. */
  public void testAddGroupsAccuracy() {
    assertEquals("addGroups1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    List ss = Arrays.asList(editor.getScorecard().getAllGroups());
    assertTrue("addGroups2 is wrong.", ss.indexOf(group1) != -1);
    assertTrue("addGroups3 is wrong.", ss.indexOf(group2) != -1);
  }
  /** Tests insertGroup(Group group, int index) method with accuracy state. */
  public void testInsertGroupAccuracy() {
    assertEquals("insertGroup1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);
    assertEquals("insertGroup2 is wrong.", group2, editor.getScorecard().getGroup(1));

    Group group3 = new Group(123);
    editor.insertGroup(group3, 1);

    assertEquals("insertGroup3 is wrong.", 3, editor.getScorecard().getNumberOfGroups());
    assertEquals("insertGroup4 is wrong.", group3, editor.getScorecard().getGroup(1));
  }
  /** Tests getNumberOfGroups() method with accuracy state. */
  public void testGetNumberOfGroupsAccuracy() {
    assertEquals("getNumberOfGroups1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    assertEquals("getNumberOfGroups2 is wrong.", 2, editor.getScorecard().getNumberOfGroups());

    Group group3 = new Group(123);
    editor.addGroup(group3);

    assertEquals("getNumberOfGroups3 is wrong.", 3, editor.getScorecard().getNumberOfGroups());
  }
  /** Tests removeGroups(Group[] groups) method with accuracy state. */
  public void testRemoveGroupsAccuracy() {
    assertEquals("removeGroups1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    Group group3 = new Group(123);
    editor.addGroup(group3);

    assertEquals("removeGroups2 is wrong.", 3, editor.getScorecard().getNumberOfGroups());

    editor.removeGroups(new Group[] {group1, group3});

    assertEquals("removeGroups3 is wrong.", 1, editor.getScorecard().getNumberOfGroups());

    assertEquals("removeGroups4 is wrong.", group2, editor.getScorecard().getGroup(0));
  }
  /** Tests removeGroup(Group group) method with accuracy state. */
  public void testRemoveGroupAccuracy() {
    assertEquals("removeGroup1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    List ss = Arrays.asList(editor.getScorecard().getAllGroups());
    assertTrue("removeGroup2 is wrong.", ss.indexOf(group1) != -1);
    assertTrue("removeGroup3 is wrong.", ss.indexOf(group2) != -1);

    editor.removeGroup(group2);

    List ss2 = Arrays.asList(editor.getScorecard().getAllGroups());
    assertEquals("removeGroup4 is wrong.", 1, ss2.size());
    assertTrue("removeGroup5 is wrong.", ss2.indexOf(group1) != -1);
    assertTrue("removeGroup6 is wrong.", ss2.indexOf(group2) == -1);
  }
  /** Tests getAllGroups() method with accuracy state. */
  public void testGetAllGroupsAccuracy() {
    assertEquals("getAllGroups1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    Group group3 = new Group(123);
    editor.addGroup(group3);

    Group[] ss = editor.getScorecard().getAllGroups();
    assertEquals("getAllGroups1 is wrong.", 3, ss.length);

    List ss2 = Arrays.asList(ss);

    assertTrue("getAllGroups5 is wrong.", ss2.indexOf(group1) != -1);
    assertTrue("getAllGroups6 is wrong.", ss2.indexOf(group2) != -1);
    assertTrue("getAllGroups6 is wrong.", ss2.indexOf(group3) != -1);
  }
  /** Tests removeGroup(int index) method with accuracy state. */
  public void testRemoveGroup2Accuracy() {
    assertEquals("getNumberOfGroups1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroups(groups);

    Group group3 = new Group(123);
    editor.addGroup(group3);

    assertEquals("getNumberOfGroups2 is wrong.", 3, editor.getScorecard().getNumberOfGroups());

    editor.removeGroup(1);

    assertEquals("getNumberOfGroups2 is wrong.", 2, editor.getScorecard().getNumberOfGroups());

    List ss2 = Arrays.asList(editor.getScorecard().getAllGroups());
    assertTrue("getAllGroups5 is wrong.", ss2.indexOf(group1) != -1);
    assertTrue("getAllGroups6 is wrong.", ss2.indexOf(group3) != -1);
  }
 /** Tests checkWeights(float tolerance) method with accuracy state. */
 public void testCheckWeightsAccuracy3() {
   editor.addGroups(groups);
   assertTrue("checkWeights is wrong", editor.getScorecard().checkWeights(0.08f));
 }