Make example unit tests nicer and pull out fragment test into separate file