@Test public void testInfoLogCallsMadeForResume() throws Exception { PowerMockito .when( TransferListener.getInstance(null, null) ).thenReturn(mockTransferListener); PowerMockito .when( faspmanager2.modifyTransfer(anyString(), anyInt(), anyLong()) ).thenReturn(true); when(mockLog.isDebugEnabled()).thenReturn(false); AsperaFaspManagerWrapper wrapper = new AsperaFaspManagerWrapper(); wrapper.log = mockLog; boolean rtn = wrapper.resume("xyz123"); assertTrue(rtn); verify(mockLog, times(1)).info(Mockito.eq("Resuming transfer with xferId [xyz123]")); }
public boolean resume(final String xferId) { log.info("Resuming transfer with xferId [" + xferId + "]"); log.trace("Calling method [modifyTransfer] with parameters [\"" + xferId + "\", 5, 0]"); boolean rtn = faspmanager2.modifyTransfer(xferId, 5, 0); log.trace("Method [modifyTransfer] returned for xferId [\"" + xferId + "\"] with result: [" + rtn + "]"); return rtn; }
AsperaFaspManagerWrapper { public boolean resume(final String xferId) { log.info("Resuming transfer with xferId [" + xferId + "]"); log.trace("Calling method [modifyTransfer] with parameters [\"" + xferId + "\", 5, 0]"); boolean rtn = faspmanager2.modifyTransfer(xferId, 5, 0); log.trace("Method [modifyTransfer] returned for xferId [\"" + xferId + "\"] with result: [" + rtn + "]"); return rtn; } }
AsperaFaspManagerWrapper { public boolean resume(final String xferId) { log.info("Resuming transfer with xferId [" + xferId + "]"); log.trace("Calling method [modifyTransfer] with parameters [\"" + xferId + "\", 5, 0]"); boolean rtn = faspmanager2.modifyTransfer(xferId, 5, 0); log.trace("Method [modifyTransfer] returned for xferId [\"" + xferId + "\"] with result: [" + rtn + "]"); return rtn; } AsperaFaspManagerWrapper();  AsperaFaspManagerWrapper(AsperaTransaction asperaTransaction); }
AsperaFaspManagerWrapper { public boolean resume(final String xferId) { log.info("Resuming transfer with xferId [" + xferId + "]"); log.trace("Calling method [modifyTransfer] with parameters [\"" + xferId + "\", 5, 0]"); boolean rtn = faspmanager2.modifyTransfer(xferId, 5, 0); log.trace("Method [modifyTransfer] returned for xferId [\"" + xferId + "\"] with result: [" + rtn + "]"); return rtn; } AsperaFaspManagerWrapper();  AsperaFaspManagerWrapper(AsperaTransaction asperaTransaction); long startTransfer(final String xferId, final String transferSpecStr); boolean pause(final String xferId); boolean resume(final String xferId); boolean cancel(final String xferId); boolean isRunning(final String xferId); boolean configureLogLocation(final String ascpLogPath); void setAsperaTransaction(AsperaTransaction asperaTransaction); }
AsperaFaspManagerWrapper { public boolean resume(final String xferId) { log.info("Resuming transfer with xferId [" + xferId + "]"); log.trace("Calling method [modifyTransfer] with parameters [\"" + xferId + "\", 5, 0]"); boolean rtn = faspmanager2.modifyTransfer(xferId, 5, 0); log.trace("Method [modifyTransfer] returned for xferId [\"" + xferId + "\"] with result: [" + rtn + "]"); return rtn; } AsperaFaspManagerWrapper();  AsperaFaspManagerWrapper(AsperaTransaction asperaTransaction); long startTransfer(final String xferId, final String transferSpecStr); boolean pause(final String xferId); boolean resume(final String xferId); boolean cancel(final String xferId); boolean isRunning(final String xferId); boolean configureLogLocation(final String ascpLogPath); void setAsperaTransaction(AsperaTransaction asperaTransaction);  }