improve proto test and correcting a few bugs in btUnit