Fix unit tests. @InjectMocks gets confused for args with same erasure.
Add missing licence headers.