@Test public void shouldNotFindFile_FileNameWrong() { File f1 = targetFactory.findImageFile("NonExisting.java"); assertFalse(f1.exists()); f1 = targetFactory.findImageFile("NON_EXISTING_FOLDER/TargetFactory.java"); assertFalse(f1.exists()); f1 = targetFactory.findImageFile("NON_EXISTING_FOLDER\\TargetFactory.java"); assertFalse(f1.exists()); f1 = targetFactory.findImageFile("ikuli/TargetFactory.java"); assertFalse(f1.exists()); f1 = targetFactory.findImageFile("ikuli\\TargetFactory.java"); assertFalse(f1.exists()); }
@VisibleForTesting protected File findImageFile(String imageFile) { File foundImageFile = findImageFile(folderToScan, imageFile); return foundImageFile == null ? new File(imageFile) : foundImageFile; }
TargetFactory { @VisibleForTesting protected File findImageFile(String imageFile) { File foundImageFile = findImageFile(folderToScan, imageFile); return foundImageFile == null ? new File(imageFile) : foundImageFile; } }
TargetFactory { @VisibleForTesting protected File findImageFile(String imageFile) { File foundImageFile = findImageFile(folderToScan, imageFile); return foundImageFile == null ? new File(imageFile) : foundImageFile; }  }
TargetFactory { @VisibleForTesting protected File findImageFile(String imageFile) { File foundImageFile = findImageFile(folderToScan, imageFile); return foundImageFile == null ? new File(imageFile) : foundImageFile; }  void setImagePrefix(String imagePathPrefix); ImageTarget createImageTarget(String imageFile); }
TargetFactory { @VisibleForTesting protected File findImageFile(String imageFile) { File foundImageFile = findImageFile(folderToScan, imageFile); return foundImageFile == null ? new File(imageFile) : foundImageFile; }  void setImagePrefix(String imagePathPrefix); ImageTarget createImageTarget(String imageFile);  }