unit tests for bytes lib