TestUtil.writeDataToFile(TEST_FILE1, testData);
FTPFile[] files = client.listFiles();
assertEquals(4, files.length);
FTPFile file = getFile(files, TEST_FILE1.getName());
assertEquals(TEST_FILE1.getName(), file.getName());
assertEquals(testData.length, file.getSize());
assertEquals("group", file.getGroup());
assertEquals("user", file.getUser());
assertTrue(file.isFile());
assertFalse(file.isDirectory());
file = getFile(files, TEST_FILE2.getName());
assertEquals(TEST_FILE2.getName(), file.getName());
assertEquals(0, file.getSize());
assertEquals("group", file.getGroup());
assertEquals("user", file.getUser());
assertTrue(file.isFile());
assertFalse(file.isDirectory());
file = getFile(files, TEST_DIR1.getName());
assertEquals(TEST_DIR1.getName(), file.getName());
assertEquals(0, file.getSize());
assertEquals("group", file.getGroup());
assertEquals("user", file.getUser());
assertFalse(file.isFile());
assertTrue(file.isDirectory());
file = getFile(files, TEST_DIR2.getName());
assertEquals(TEST_DIR2.getName(), file.getName());
assertEquals(0, file.getSize());
assertEquals("group", file.getGroup());
assertEquals("user", file.getUser());
assertFalse(file.isFile());
assertTrue(file.isDirectory());
}