Unit and perf tests of lbinenc