@Test public void testLoad_TfNotFound() { when(mockPropertyService.getProperty(PropertyService.PROP_TF_HOME)) .thenReturn(StringUtils.EMPTY); when(TfTool.tryDetectTf()).thenReturn(null); form.load(); assertEquals(StringUtils.EMPTY, form.getCurrentExecutablePath()); }
@Test public void testLoad_TfDetected() { when(mockPropertyService.getProperty(PropertyService.PROP_TF_HOME)) .thenReturn(StringUtils.EMPTY); when(TfTool.tryDetectTf()).thenReturn("/path/to/detected/cmd/tf"); form.load(); assertEquals("/path/to/detected/cmd/tf", form.getCurrentExecutablePath()); }