@VisibleForTesting
@Nonnull KeyStrokeMapping mappingFrom(@Nonnull String line) {
String[] parts = line.trim().split(",");
if (parts.length != 3) {
String msg = String.format("Line '%s' does not conform with pattern '{char}, {keycode}, {modifiers}'", line);
throw new ParsingException(msg);
}
char character = characterFrom(parts[0].trim());
int keyCode = keyCodeFrom(parts[1].trim());
int modifiers = modifiersFrom(parts[2].trim());
return mapping(character, keyCode, modifiers);