Exclude generated sources from coverage and add some tests