AecuServiceImpl implements AecuService { @Override public boolean isValidScriptName(String name) { if (!name.endsWith(".groovy")) { return false; } return !name.contains(".fallback.") && !DIR_FALLBACK_SCRIPT.equals(name); }  @Override String getVersion(); @Override List<String> getFiles(String path); @Override boolean matchesRunmodes(String name); @Override boolean isValidScriptName(String name); @Override ExecutionResult execute(String path); @Override HistoryEntry createHistoryEntry(); @Override HistoryEntry finishHistoryEntry(HistoryEntry history); @Override HistoryEntry storeExecutionInHistory(HistoryEntry history, ExecutionResult result); @Override List<HistoryEntry> getHistory(int startIndex, int count);  }
@Test public void isValidScriptName_ok() { assertTrue(service.isValidScriptName("test.groovy")); }
@Test public void isValidScriptName_invalidExtension() { assertFalse(service.isValidScriptName("test.txt")); }
@Test public void isValidScriptName_fallback() { assertFalse(service.isValidScriptName("test.fallback.groovy")); }