@Test
public void testListFiles1() {

    long reqId = 16;
    String path = "/list/files/test";
    ms.mkdirs(path);
    String file1path = path + "/a";
    String file2path = path + "/b";
    ms.putFile(file1path, file1);
    ms.putFile(file2path, file1);
    BinaryRawWriterEx message = createMessage(reqId, ModelStorateThinClientProcessor.PROCESSOR_ID, ModelStorateThinClientProcessor.Method.LIST_FILES);
    message.writeString(path);
    ClientCustomQueryRequest req = new ClientCustomQueryRequest(toReader(message));
    ClientResponse resp = req.process(connCtx);
    assertTrue(((FilesListResponse)resp).getFilesList().containsAll(Arrays.asList(file1path, file2path)));
    BinaryRawWriterEx out = createWriter();
    resp.encode(connCtx, out);
    byte[] result = out.out().arrayCopy();
    BinaryRawWriterEx expectedOut = getExpectedMessageHeader(reqId);
    expectedOut.writeInt(2);
    expectedOut.writeString(file1path);
    expectedOut.writeString(file2path);
    byte[] expected = expectedOut.out().arrayCopy();
    assertArrayEquals(expected, result);
}