### Question:
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);  }### Answer:
@Test(expected = NullPointerException.class) public void getNull() { create().get(null); }
@Test public void get() { assertNotNull(create().get(mockFile("content.Test"))); }
@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"))); }
@Test public void getNotFound() { assertNull(create().get(mockFile("test.test3"))); }
@Test public void getEmptyExtension() { assertNull(create().get(mockFile("content."))); }
@Test public void getNoExtension() { assertNull(create().get(mockFile("content"))); }