### Question:
EditorModel { public boolean isBoringFile(File f) { if (f == null) { return false; } final String name = f.getName().toLowerCase(); return f.isHidden() || name.endsWith(".class") || name.startsWith("~") || name.endsWith("~") || name.startsWith("#") || name.endsWith(".exe") || name.endsWith(".gif") || name.endsWith(".jpeg") || name.endsWith(".jpg") || name.endsWith(".tiff"); } EditorModel(Resources resources,
                     TextSource.Factory textSourceFactory,
                     AgentCacheState agentCacheState,
                     FileChangeWatcher fileChangeWatcher); Buffer getSelectedBuffer(); void selectNewBuffer(); Buffer selectBufferForFile(File file); Buffer getBufferForFile(File file); Buffer[] getBuffers(); boolean isABufferDirty(); void selectBuffer(Buffer buffer); void closeBuffer(final Buffer buffer); File getSelectedPropertiesFile(); void setSelectedPropertiesFile(final File selectedProperties); void addListener(Listener listener); boolean isScriptFile(File f); boolean isPropertiesFile(File f); boolean isSelectedScript(File f); boolean isBoringFile(File f); void openWithExternalEditor(final File file); void setExternalEditor(File command, String arguments);  }### Answer:
@Test public void testIsBoringFile() throws Exception { final EditorModel editorModel = new EditorModel(s_resources, new StringTextSource.Factory(), m_agentCacheState, m_fileChangeWatcher); final File[] boring = { new File("some.class"), new File("~temporary"), new File("#BLAH BLAH"), new File("furble.exe"), new File("PIC.GIF"), new File("dfadhklfda.Jpeg"), new File("dfadhklfda.jpg"), new File("dfadhklfda.tiff"), }; for (int i = 0; i < boring.length; ++i) { assertTrue("Is boring: " + boring[i], editorModel.isBoringFile(boring[i])); } final File[] notBoring = { null, new File("Script.Py"), new File("some.java"), new File("my.properties"), new File("README"), new File("info.text"), }; for (int i = 0; i < notBoring.length; ++i) { assertTrue("Isn't boring: " + notBoring[i], !editorModel.isBoringFile(notBoring[i])); } }