### Question:
TransFileListener implements FileListener { public boolean accepts( String fileName ) { if ( fileName == null || fileName.indexOf( '.' ) == -1 ) { return false; } String extension = fileName.substring( fileName.lastIndexOf( '.' ) + 1 ); return extension.equals( "ktr" ); }  boolean open( Node transNode, String fname, boolean importfile ); boolean save( EngineMetaInterface meta, String fname, boolean export ); void syncMetaName( EngineMetaInterface meta, String name ); boolean accepts( String fileName ); boolean acceptsXml( String nodeName ); String[] getFileTypeDisplayNames( Locale locale ); String getRootNodeName(); String[] getSupportedExtensions();  }### Answer:
@Test public void testAccepts() throws Exception { assertFalse( transFileListener.accepts( null ) ); assertFalse( transFileListener.accepts( "NoDot" ) ); assertTrue( transFileListener.accepts( "Trans.ktr" ) ); assertTrue( transFileListener.accepts( ".ktr" ) ); }