Helper assertion in test