@Test
public void testWriteByteArray() throws IOException {

    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    lfh.setLogFile(byteArrayOutputStream);
    lfh.writeEscapedBytes(testUnescaped);
    byte[] result = byteArrayOutputStream.toByteArray();
    Assert.assertTrue(Arrays.equals(expectedEscaped, result));
}