@Test
public void readFile() throws IOException {

    java.io.File dataFile1 = getFilePathByPartition(configuration, 0, 0);
    Files.touch(dataFile1);
    partitionService.setActive(new Partition(0, 0));
    File file = fileListService.getFile(0, 0);
    byte[] data = new byte[]{0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9};
    file.getFileChannel().write(ByteBuffer.wrap(data), 0);
    assertEquals(Bytes.getArray(FileUtils.readFile(file, 0, 1))[0], 0x0);
    assertEquals(Bytes.getArray(FileUtils.readFile(file, 3, 1))[0], 0x3);
    assertEquals(Bytes.getArray(FileUtils.readFile(file, 0, 1))[0], 0x0);
    file.close();
}