@Test public void getCaseInsensitive() { MarkupLanguage language1 = mockMarkupLanguage("Test"); MarkupLanguage language2 = mockMarkupLanguage("Test2"); FileToMarkupLanguage fileToMarkupLanguage = create(language1, language2); assertSame(language1, fileToMarkupLanguage.get(mockFile("test.Test"))); assertSame(language1, fileToMarkupLanguage.get(mockFile("test.test"))); assertSame(language2, fileToMarkupLanguage.get(mockFile("test.test2"))); assertSame(language2, fileToMarkupLanguage.get(mockFile("test.tEst2"))); }
public MarkupLanguage get(File file) { requireNonNull(file); String extension = computeFileExtension(file); return extensionToMarkupLanguage.get(extension.toLowerCase()); }
FileToMarkupLanguage { public MarkupLanguage get(File file) { requireNonNull(file); String extension = computeFileExtension(file); return extensionToMarkupLanguage.get(extension.toLowerCase()); } }
FileToMarkupLanguage { public MarkupLanguage get(File file) { requireNonNull(file); String extension = computeFileExtension(file); return extensionToMarkupLanguage.get(extension.toLowerCase()); } FileToMarkupLanguage();  FileToMarkupLanguage(Set<MarkupLanguage> markupLanguages); }
FileToMarkupLanguage { public MarkupLanguage get(File file) { requireNonNull(file); String extension = computeFileExtension(file); return extensionToMarkupLanguage.get(extension.toLowerCase()); } FileToMarkupLanguage();  FileToMarkupLanguage(Set<MarkupLanguage> markupLanguages); MarkupLanguage get(File file); }
FileToMarkupLanguage { public MarkupLanguage get(File file) { requireNonNull(file); String extension = computeFileExtension(file); return extensionToMarkupLanguage.get(extension.toLowerCase()); } FileToMarkupLanguage();  FileToMarkupLanguage(Set<MarkupLanguage> markupLanguages); MarkupLanguage get(File file);  }