@@ -0,0 +1,1968 @@
+/*%0ACopyright 2012 Selenium committers%0ACopyright 2012 Software Freedom Conservancy%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A     http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applicable law or agreed to in writing, software%0Adistributed under the License is distributed on an %22AS IS%22 BASIS,%0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0ASee the License for the specific language governing permissions and%0Alimitations under the License.%0A*/%0A%0Apackage org.openqa.selenium;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.StringTokenizer;%0A%0Aimport static org.hamcrest.Matchers.instanceOf;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotSame;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0Apublic class KeysTest %7B%0A%0A  @Test%0A  public void charAtPosition0ReturnsKeyCode() %7B%0A    assertNotSame(Keys.LEFT.charAt(0), 0);%0A  %7D%0A%0A  @Test%0A  public void charAtOtherPositionReturnsZero() %7B%0A    assertEquals(Keys.LEFT.charAt(10), 0);%0A  %7D%0A%0A  @Test%0A  public void lengthIsAlwaysOne() %7B%0A    assertThat(Keys.LEFT.length(), is(1));%0A  %7D%0A%0A  @Test%0A  public void validSubSequence() %7B%0A    assertEquals(Keys.LEFT.subSequence(0, 1), String.valueOf(Keys.LEFT));%0A  %7D%0A%0A  @Test%0A  public void invalidSubSequenceThrows() %7B%0A    try %7B%0A      Keys.LEFT.subSequence(-1, 10);%0A      fail(%22Expected IndexOutOfBoundsException%22);%0A    %7D catch (RuntimeException e) %7B%0A      assertThat(e, is(instanceOf(IndexOutOfBoundsException.class)));%0A    %7D%0A  %7D%0A%0A  @Test%0A  public void buildChord() %7B%0A    CharSequence%5B%5D sequences = %7B%22foo%22, Keys.LEFT%7D;%0A    assertEquals(Keys.chord(sequences), %22foo%5CuE012%5CuE000%22);%0A  %7D%0A%0A  @Test%0A  public void keyForCharacterCode() %7B%0A    Keys key = Keys.LEFT;%0A    assertThat(Keys.getKeyFromUnicode(key.charAt(0)), is(key));%0A  %7D%0A%0A%7D

Add tests for Keys