/** 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 addGroup(Group group) method with accuracy state. */
  public void testAddGroupAccuracy() {
    assertEquals("addSection1 is wrong.", 0, editor.getScorecard().getNumberOfGroups());

    editor.addGroup(group1);
    assertEquals("addSection2 is wrong.", 1, editor.getScorecard().getNumberOfGroups());
    assertEquals("addSection3 is wrong.", group1, editor.getScorecard().getGroup(0));
  }
  /** 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 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);
  }