add buildByteArray method and tests for it
Merge branch 'commands-processor'