DRY binary search test