use of org.apache.ftpserver.ftplet.FtpReply in project ddf by codice.
the class FtpRequestHandlerTest method testFileIngestUniqueSuccess.
@Test
public void testFileIngestUniqueSuccess() throws FtpException, IOException, SourceUnavailableException, IngestException {
setupIngest();
FtpletResult result = ftplet.onUploadUniqueStart(session, request);
ArgumentCaptor<FtpReply> argumentCaptor = ArgumentCaptor.forClass(FtpReply.class);
verify(session, atLeast(1)).write(argumentCaptor.capture());
assertEquals(FtpletResult.SKIP, result);
List<String> strReplies = argumentCaptor.getAllValues().stream().map(FtpReply::getMessage).collect(Collectors.toList());
assertThat(strReplies, hasItem(containsString("Storing data with unique name: " + METACARD_ID)));
}
Aggregations