Fix sample build issue and make unit test with culture change more robust