@Test
 public void should_parse_file_in_classpath() {
   KeyStrokeMappingProvider mappingProvider = parser.parse("keyboard-mapping.txt");
   assertThatContainsDefaultMappings(mappingProvider);
   Collection<KeyStrokeMapping> mappings = mappingProvider.keyStrokeMappings();
   assertThat(mappings)
       .contains(
           mapping('a', VK_A, NO_MASK),
           mapping('A', VK_A, SHIFT_MASK),
           mapping(',', VK_COMMA, NO_MASK));
 }
 @Test
 public void should_parse_file() throws Exception {
   File f = null;
   try {
     f = createMappingFile("a, A, NO_MASK");
     KeyStrokeMappingProvider mappingProvider = parser.parse(f);
     assertThatContainsDefaultMappings(mappingProvider);
     Collection<KeyStrokeMapping> mappings = mappingProvider.keyStrokeMappings();
     assertThat(mappings).contains(mapping('a', VK_A, NO_MASK));
   } finally {
     if (f != null) {
       f.delete();
     }
   }
 }
 private static void assertThatContainsDefaultMappings(KeyStrokeMappingProvider mappingProvider) {
   Collection<KeyStrokeMapping> mappings = mappingProvider.keyStrokeMappings();
   assertThat(mappings)
       .contains(
           mapping('\b', VK_BACK_SPACE, NO_MASK),
           mapping('', VK_DELETE, NO_MASK),
           mapping('\n', VK_ENTER, NO_MASK),
           mapping('', VK_ESCAPE, NO_MASK),
           mapping('\t', VK_TAB, NO_MASK));
   if (isWindows()) {
     assertThat(mappings).contains(mapping('\r', VK_ENTER, NO_MASK));
   }
 }