/*
 * Copyright (C) 2013-2014 Phokham Nonava
 *
 * Use of this source code is governed by the MIT license that can be
 * found in the LICENSE file.
 */
package com.fluxchess.pulse;

import org.junit.Test;

import java.lang.reflect.InvocationTargetException;

import static com.fluxchess.test.AssertUtil.assertUtilityClassWellDefined;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class RankTest {

  @Test
  public void testUtilityClass()
      throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
    assertUtilityClassWellDefined(Rank.class);
  }

  @Test
  public void testValues() {
    for (int rank : Rank.values) {
      assertThat(Rank.values[rank], is(rank));
    }
  }

  @Test
  public void testIsValid() {
    for (int rank : Rank.values) {
      assertThat(Rank.isValid(rank), is(true));
    }

    assertThat(Rank.isValid(Rank.NORANK), is(false));
  }

}

@@ -252,16 +252,63 @@
 ption;%0A%0A
+import static com.fluxchess.pulse.Rank.NORANK;%0A
 import s
@@ -978,21 +978,16 @@
 isValid(
-Rank.
 NORANK),

Add static import in RankTest