Convert ByteArray tracetest to unit test