### Question:
OpenStreetMapManager extends FileSender { @Override public boolean accept(File dir, String name) { return name.toLowerCase().contains(".gpx"); } OpenStreetMapManager(PreferenceHelper preferenceHelper); static OAuthProvider getOSMAuthProvider(); boolean isOsmAuthorized(); static OAuthConsumer getOSMAuthConsumer(); @Override void uploadFile(List<File> files); @Override boolean isAvailable(); @Override boolean hasUserAllowedAutoSending(); void uploadFile(String fileName); @Override boolean accept(File dir, String name);  }### Answer:
@Test public void Accept_OnlyGpxAllowed(){ PreferenceHelper pm = mock(PreferenceHelper.class); OpenStreetMapManager osm = new OpenStreetMapManager(pm); assertThat("Only GPX files allowed", osm.accept(new File("/"), "abc.def"), is(false)); assertThat("Only GPX files allowed", osm.accept(new File("/"), "abc.gpx"), is(true)); }