Repository: mockito/mockito
Issue: Enable Checkstyle rule for checking existence of license headers

Whenever we add new files to the repository, we usually forget to add our license headers. This results in PRs such as #1227 where retroactively we add the license headers.

CheckStyle has a rule called [`Header`](http://checkstyle.sourceforge.net/config_header.html) which can enforce that we add our license header. I would propose to start enabling this rule to make sure all our source files comply to our licensing.

@mockito/core yay/nay?

Issue comments:
Think it makes sense to add a check since we have it. Without it, the project will just always be inconsistent.
Absolutely +1. Thank you!

Pull request review comments:
Coudn't we apply it automatically to all projects that apply Java plugin? Similar way it is done with JaCoCo - to do not miss another module once added.
Uh, yeah maybe. Not a Gradle expert, but I can give it a shot tomorrow!
Done. Please take a look :+1: 
Do we use that plugin to handle any other type of files than `.java` and `.groovy` (`.kt`?)? If not, maybe it would be good to narrow the scope to only submodules with code? It can be achieved the same way as with the coverage: `plugins.withId("java") { ... }`.
Yes also any configuration or extra files. We can limit to Java projects, but I would rather check that all our files comply. Apparently we were missing quite some in total and the more we can catch, the better. WDYT?
If it's also for non source code files I'm ok with `allprojects` unconditionally.

Patch that resolved the issue:
diff --git a/build.gradle b/build.gradle
index 34b7d0fc3c..575662ecff 100644
--- a/build.gradle
+++ b/build.gradle
@@ -32,12 +32,12 @@ apply from: 'gradle/root/ide.gradle'
 apply from: 'gradle/root/gradle-fix.gradle'
 apply from: 'gradle/root/java6-compatibility.gradle'
 apply from: 'gradle/java-library.gradle'
+apply from: 'gradle/license.gradle'
 apply from: 'gradle/root/coverage.gradle'
 
 apply from: 'gradle/mockito-core/inline-mock.gradle'
 apply from: 'gradle/mockito-core/osgi.gradle'
 apply from: 'gradle/mockito-core/javadoc.gradle'
-apply from: 'gradle/mockito-core/license.gradle'
 apply from: 'gradle/mockito-core/testing.gradle'
 
 apply from: 'gradle/dependencies.gradle'
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index ea9a5320f5..b339c959c2 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -27,5 +27,9 @@
             <property name="processJavadoc" value="true"/>
         </module>
     </module>
+    <module name="RegexpHeader">
+        <property name="headerFile" value="config/checkstyle/java.header"/>
+        <property name="fileExtensions" value="java"/>
+    </module>
 </module>
 
diff --git a/config/checkstyle/java.header b/config/checkstyle/java.header
new file mode 100644
index 0000000000..3087970dfd
--- /dev/null
+++ b/config/checkstyle/java.header
@@ -0,0 +1,4 @@
+^/\*$
+^ \* Copyright \(c\) \d\d\d\d Mockito contributors$
+^ \* This program is made available under the terms of the MIT License.$
+^ \*/$
diff --git a/doc/licenses/HEADER.txt b/doc/licenses/HEADER.txt
index 9c1b1d3d76..23f5c49076 100644
--- a/doc/licenses/HEADER.txt
+++ b/doc/licenses/HEADER.txt
@@ -1,2 +1,2 @@
-Copyright (c) ${year} ${name}
-This program is made available under the terms of the MIT License.
\ No newline at end of file
+Copyright (c) ${year} Mockito contributors
+This program is made available under the terms of the MIT License.
diff --git a/gradle/license.gradle b/gradle/license.gradle
new file mode 100644
index 0000000000..f6eb52d899
--- /dev/null
+++ b/gradle/license.gradle
@@ -0,0 +1,16 @@
+def licenseHeaderFile = rootProject.file('doc/licenses/HEADER.txt')
+
+allprojects {
+    apply plugin: 'com.github.hierynomus.license'
+    license {
+        header = licenseHeaderFile
+        strictCheck = true
+        ignoreFailures = true
+        skipExistingHeaders = true
+        mapping {
+            java = 'SLASHSTAR_STYLE'
+            groovy = 'SLASHSTAR_STYLE'
+        }
+        ext.year = Calendar.getInstance().get(Calendar.YEAR)
+    }
+}
diff --git a/gradle/mockito-core/license.gradle b/gradle/mockito-core/license.gradle
deleted file mode 100644
index 5841ab2a37..0000000000
--- a/gradle/mockito-core/license.gradle
+++ /dev/null
@@ -1,14 +0,0 @@
-apply plugin: 'com.github.hierynomus.license'
-
-license {
-    header = rootProject.file('doc/licenses/HEADER.txt')
-    strictCheck = true
-    ignoreFailures = true
-    skipExistingHeaders = true
-    mapping {
-        java = 'SLASHSTAR_STYLE'
-        groovy = 'SLASHSTAR_STYLE'
-    }
-    ext.year = Calendar.getInstance().get(Calendar.YEAR)
-    ext.name = 'Mockito contributors'
-}
diff --git a/src/main/java/org/mockito/CheckReturnValue.java b/src/main/java/org/mockito/CheckReturnValue.java
index 42c7545bff..59bfc333fb 100644
--- a/src/main/java/org/mockito/CheckReturnValue.java
+++ b/src/main/java/org/mockito/CheckReturnValue.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito;
 
 import java.lang.annotation.ElementType;
diff --git a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidByteBuddyMockMaker.java b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidByteBuddyMockMaker.java
index 17473589b1..56ffcec0bb 100644
--- a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidByteBuddyMockMaker.java
+++ b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidByteBuddyMockMaker.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.android.internal.creation;
 
 import org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker;
diff --git a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidLoadingStrategy.java b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidLoadingStrategy.java
index eeac19db28..600b9bc248 100644
--- a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidLoadingStrategy.java
+++ b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidLoadingStrategy.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.android.internal.creation;
 
 import static org.mockito.internal.util.StringUtil.join;
diff --git a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidTempFileLocator.java b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidTempFileLocator.java
index 1e1dbb73d6..a79816c4f5 100644
--- a/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidTempFileLocator.java
+++ b/subprojects/android/src/main/java/org/mockito/android/internal/creation/AndroidTempFileLocator.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.android.internal.creation;
 
 import java.io.File;


Test patch:
diff --git a/src/test/java/org/mockitousage/bugs/GenericsMockitoAnnotationsTest.java b/src/test/java/org/mockitousage/bugs/GenericsMockitoAnnotationsTest.java
index f6ee1d8575..51f23693bc 100644
--- a/src/test/java/org/mockitousage/bugs/GenericsMockitoAnnotationsTest.java
+++ b/src/test/java/org/mockitousage/bugs/GenericsMockitoAnnotationsTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.bugs;
 
 import org.junit.Before;
diff --git a/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java b/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java
index 146888c92f..f0e42ee188 100644
--- a/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java
+++ b/src/test/java/org/mockitousage/verification/VerificationAfterDelayTest.java
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2007 Mockito contributors This program is made available under the terms of the MIT License.
+ * Copyright (c) 2007 Mockito contributors
+ * This program is made available under the terms of the MIT License.
  */
 
 package org.mockitousage.verification;
diff --git a/subprojects/extTest/src/test/java/org/mockitousage/plugins/stacktrace/MyStackTraceCleanerProvider.java b/subprojects/extTest/src/test/java/org/mockitousage/plugins/stacktrace/MyStackTraceCleanerProvider.java
index cd9ed4039b..951c149d66 100644
--- a/subprojects/extTest/src/test/java/org/mockitousage/plugins/stacktrace/MyStackTraceCleanerProvider.java
+++ b/subprojects/extTest/src/test/java/org/mockitousage/plugins/stacktrace/MyStackTraceCleanerProvider.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.plugins.stacktrace;
 
 import org.mockito.exceptions.stacktrace.StackTraceCleaner;
diff --git a/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyMockMaker.java b/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyMockMaker.java
index 4476d08356..0a8ea162bc 100644
--- a/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyMockMaker.java
+++ b/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyMockMaker.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.plugins.switcher;
 
 import org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker;
diff --git a/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyPluginSwitch.java b/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyPluginSwitch.java
index 4c918e70e1..eb4423f361 100644
--- a/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyPluginSwitch.java
+++ b/subprojects/extTest/src/test/java/org/mockitousage/plugins/switcher/MyPluginSwitch.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.plugins.switcher;
 
 import org.mockito.plugins.PluginSwitch;
diff --git a/subprojects/inline/src/test/java/org/mockitoinline/FinalClassMockingTest.java b/subprojects/inline/src/test/java/org/mockitoinline/FinalClassMockingTest.java
index 9803d4b167..0f2ea78288 100644
--- a/subprojects/inline/src/test/java/org/mockitoinline/FinalClassMockingTest.java
+++ b/subprojects/inline/src/test/java/org/mockitoinline/FinalClassMockingTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitoinline;
 
 import org.junit.Test;
diff --git a/subprojects/inline/src/test/java/org/mockitoinline/PluginTest.java b/subprojects/inline/src/test/java/org/mockitoinline/PluginTest.java
index a3feb34c67..19526db2a9 100644
--- a/subprojects/inline/src/test/java/org/mockitoinline/PluginTest.java
+++ b/subprojects/inline/src/test/java/org/mockitoinline/PluginTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitoinline;
 
 import org.junit.Test;
diff --git a/subprojects/inline/src/test/java/org/mockitoinline/StubbingLocationTest.java b/subprojects/inline/src/test/java/org/mockitoinline/StubbingLocationTest.java
index 050298dfce..8476006425 100644
--- a/subprojects/inline/src/test/java/org/mockitoinline/StubbingLocationTest.java
+++ b/subprojects/inline/src/test/java/org/mockitoinline/StubbingLocationTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitoinline;
 
 import java.util.Collections;
diff --git a/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/FunctionTest.kt b/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/FunctionTest.kt
index 944263c7e3..c509648c9a 100644
--- a/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/FunctionTest.kt
+++ b/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/FunctionTest.kt
@@ -1,3 +1,7 @@
+/**
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.kotlin
 
 import org.junit.Test
diff --git a/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/SuspendTest.kt b/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/SuspendTest.kt
index 191bc84c25..bfef4071e4 100644
--- a/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/SuspendTest.kt
+++ b/subprojects/kotlinTest/src/test/kotlin/org/mockito/kotlin/SuspendTest.kt
@@ -1,3 +1,7 @@
+/**
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.kotlin
 
 import kotlinx.coroutines.experimental.runBlocking
diff --git a/subprojects/testng/src/main/java/org/mockito/testng/MockitoAfterTestNGMethod.java b/subprojects/testng/src/main/java/org/mockito/testng/MockitoAfterTestNGMethod.java
index 257e068040..4e24e354b9 100644
--- a/subprojects/testng/src/main/java/org/mockito/testng/MockitoAfterTestNGMethod.java
+++ b/subprojects/testng/src/main/java/org/mockito/testng/MockitoAfterTestNGMethod.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/main/java/org/mockito/testng/MockitoBeforeTestNGMethod.java b/subprojects/testng/src/main/java/org/mockito/testng/MockitoBeforeTestNGMethod.java
index b122a8a093..a69db36221 100644
--- a/subprojects/testng/src/main/java/org/mockito/testng/MockitoBeforeTestNGMethod.java
+++ b/subprojects/testng/src/main/java/org/mockito/testng/MockitoBeforeTestNGMethod.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.testng;
 
 import org.mockito.Captor;
diff --git a/subprojects/testng/src/main/java/org/mockito/testng/MockitoTestNGListener.java b/subprojects/testng/src/main/java/org/mockito/testng/MockitoTestNGListener.java
index 370d106cab..f3d809c4c1 100644
--- a/subprojects/testng/src/main/java/org/mockito/testng/MockitoTestNGListener.java
+++ b/subprojects/testng/src/main/java/org/mockito/testng/MockitoTestNGListener.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockito.testng;
 
 import org.testng.IInvokedMethod;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
index fb4e7bd166..ae161e3c30 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/AnnotatedFieldsShouldBeInitializedByMockitoTestNGListenerTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.ArgumentCaptor;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
index 79c3071408..193dbfa610 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/CaptorAnnotatedFieldShouldBeClearedTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.ArgumentCaptor;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
index 76095f3af4..2093549f51 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/ConfigurationMethodTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
index 5cbe4fc20d..7992980cce 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/DontResetMocksIfNoListenerTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
index a84bfacb31..f2ebc8712b 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/EnsureMocksAreInitializedBeforeBeforeClassMethodTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
index 53702190f2..5b2edb5328 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/InitializeChildTestWhenParentHasListenerTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
index 8660b1893f..cc7d40aba0 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/MockFieldsShouldBeResetBetweenTestMethodsTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.InjectMocks;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/ParentTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/ParentTest.java
index 870d31b3a9..02ac09d850 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/ParentTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/ParentTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/ResetMocksInParentTestClassTooTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/ResetMocksInParentTestClassTooTest.java
index e9dd50a83a..bc4a3d9032 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/ResetMocksInParentTestClassTooTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/ResetMocksInParentTestClassTooTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.testng.annotations.Test;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/SomeType.java b/subprojects/testng/src/test/java/org/mockitousage/testng/SomeType.java
index 87bba41e7d..6a662a6082 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/SomeType.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/SomeType.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import java.util.List;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
index 19cfa5abaa..41cb55409c 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/TestWithoutListenerShouldNotInitializeAnnotatedFieldsTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng;
 
 import org.mockito.ArgumentCaptor;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectAnnotationUsage.java b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectAnnotationUsage.java
index 1d4844ab14..610156cbb5 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectAnnotationUsage.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectAnnotationUsage.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng.failuretests;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectStubbingSyntax.java b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectStubbingSyntax.java
index 50f166b9e6..919bfba0ba 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectStubbingSyntax.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseIncorrectStubbingSyntax.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng.failuretests;
 
 import org.mockito.exceptions.misusing.InvalidUseOfMatchersException;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseWrongStubbingSyntaxInConfigurationMethod.java b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseWrongStubbingSyntaxInConfigurationMethod.java
index 8d0e05540c..83261d8c58 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseWrongStubbingSyntaxInConfigurationMethod.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/FailingOnPurposeBecauseWrongStubbingSyntaxInConfigurationMethod.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng.failuretests;
 
 import org.mockito.Mock;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
index 0870b9bb72..836a12a270 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/failuretests/TestNGShouldFailWhenMockitoListenerFailsTest.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng.failuretests;
 
 import org.mockito.exceptions.base.MockitoException;
diff --git a/subprojects/testng/src/test/java/org/mockitousage/testng/utils/FailureRecordingListener.java b/subprojects/testng/src/test/java/org/mockitousage/testng/utils/FailureRecordingListener.java
index 01763d7029..46f0d713f2 100644
--- a/subprojects/testng/src/test/java/org/mockitousage/testng/utils/FailureRecordingListener.java
+++ b/subprojects/testng/src/test/java/org/mockitousage/testng/utils/FailureRecordingListener.java
@@ -1,3 +1,7 @@
+/*
+ * Copyright (c) 2017 Mockito contributors
+ * This program is made available under the terms of the MIT License.
+ */
 package org.mockitousage.testng.utils;
 
 import org.testng.IConfigurationListener;
diff --git a/subprojects/testng/src/test/resources/mockito-testng.xml b/subprojects/testng/src/test/resources/mockito-testng.xml
index 68e4a36abd..cab389cbca 100644
--- a/subprojects/testng/src/test/resources/mockito-testng.xml
+++ b/subprojects/testng/src/test/resources/mockito-testng.xml
@@ -1,4 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (c) 2017 Mockito contributors
+    This program is made available under the terms of the MIT License.
+
+-->
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
 <suite name="Mockito TestNG usage" parallel="none">
     <test verbose="1" name="Mockito TestNG Integration" annotations="JDK">