## assertj/assertj-core/src/main/java/org/assertj/core/internal/Iterables.java:1132-1168
1132:   public void assertContainsExactly(AssertionInfo info, Iterable<?> actual, Object[] values) {
1133:     checkIsNotNull(values);
1134:     assertNotNull(info, actual);
1135:     // use actualAsList instead of actual in case actual is a singly-passable iterable
1136:     List<Object> actualAsList = newArrayList(actual);
1137:     assertEquivalency(info, actual, values, actualAsList);
1138:     assertElementOrder(info, actual, values, actualAsList);
1139:   }
1140: 
1141:   private void assertEquivalency(AssertionInfo info, Iterable<?> actual, Object[] values, List<Object> actualAsList) {
1142:     IterableDiff<Object> diff = diff(actualAsList, asList(values), comparisonStrategy);
1143:     if (actualAsList.size() != values.length || diff.differencesFound()) {
1144:       throw shouldContainExactlyWithDiffAssertionError(diff, actual, values, info);
1145:     }
1146:   }
1147: 
1148:   private void assertElementOrder(AssertionInfo info, Iterable<?> actual, Object[] values, List<Object> actualAsList) {
1149:     List<IndexedDiff> indexDifferences = compareOrder(values, actualAsList);
1150:     if (!indexDifferences.isEmpty()) {
1151:       throw shouldContainExactlyWithIndexAssertionError(actual, values, indexDifferences, info);
1152:     }
1153:   }
1154: 
1155:   private List<IndexedDiff> compareOrder(Object[] values, List<Object> actualAsList) {
1156:     List<IndexedDiff> indexDifferences = new ArrayList<>(Configuration.MAX_INDICES_FOR_PRINTING);
1157:     for (int i = 0; i < actualAsList.size(); i++) {
1158:       if (!areEqual(actualAsList.get(i), values[i])) {
1159:         indexDifferences.add(new IndexedDiff(actualAsList.get(i), values[i], i));
1160:         if (indexDifferences.size() >= Configuration.MAX_INDICES_FOR_PRINTING) {
1161:           break;
1162:         }
1163:       }
1164:     }
1165:     return indexDifferences;
1166:   }
1167: 
1168:   private AssertionError shouldContainExactlyWithIndexAssertionError(Iterable<?> actual, Object[] values,

## assertj/assertj-core/src/test/java/org/assertj/core/internal/iterables/Iterables_assertContainsExactly_Test.java:100-133
100:   void should_fail_if_actual_does_not_contain_given_values_exactly() {
101:     // GIVEN
102:     Object[] expected = { "Luke", "Yoda", "Han" };
103:     // WHEN
104:     expectAssertionError(() -> iterables.assertContainsExactly(INFO, actual, expected));
105:     // THEN
106:     List<String> notFound = list("Han");
107:     List<String> notExpected = list("Leia");
108:     verify(failures).failure(INFO, shouldContainExactly(actual, asList(expected), notFound, notExpected), actual,
109:                              asList(expected));
110:   }
111: 
112:   @Test
113:   void should_fail_if_actual_contains_all_given_values_in_different_order() {
114:     // GIVEN
115:     Object[] expected = { "Luke", "Leia", "Yoda" };
116:     // WHEN
117:     expectAssertionError(() -> iterables.assertContainsExactly(INFO, actual, expected));
118:     // THEN
119:     List<IndexedDiff> indexDiffs = list(new IndexedDiff("Yoda", "Leia", 1),
120:                                         new IndexedDiff("Leia", "Yoda", 2));
121:     verify(failures).failure(INFO, shouldContainExactlyWithIndexes(actual, list(expected), indexDiffs), actual, list(expected));
122:   }
123: 
124:   @Test
125:   void should_fail_if_actual_contains_all_given_values_but_size_differ() {
126:     // GIVEN
127:     actual = list("Luke", "Leia", "Luke");
128:     Object[] expected = { "Luke", "Leia" };
129:     // WHEN
130:     expectAssertionError(() -> iterables.assertContainsExactly(INFO, actual, expected));
131:     // THEN
132:     verify(failures).failure(INFO, shouldContainExactly(actual, asList(expected), emptyList(), list("Luke")), actual,
133:                              asList(expected));

## mockito/mockito-core/src/main/java/org/mockito/Mockito.java:172-185
172:  * <h3 id="0.3">0.3. <a class="meaningful_link" href="#mockito-instrumentation" name="mockito-instrumentation">Explicitly setting up instrumentation for inline mocking (Java 21+)</a></h3>
173:  *
174:  * Starting from Java 21, the <a href="https://openjdk.org/jeps/451">JDK restricts the ability of libraries
175:  * to attach a Java agent to their own JVM</a>. As a result, the inline-mock-maker might not be able
176:  * to function without an explicit setup to enable instrumentation, and the JVM will always display a warning.
177:  *
178:  * The following are examples about how to set up mockito-core as a Java agent, and it may be more appropriate to choose
179:  * a different approach depending on your project constraints.
180:  *
181:  * <p>
182:  * To explicitly attach Mockito during test execution, the library's jar file needs to be specified as <code>-javaagent</code>
183:  * as an argument to the executing JVM. To enable this in Gradle, the following example adds Mockito to all test
184:  * tasks using <strong>Kotlin DSL</strong>. Although omitted for simplicity, using a <code>CommandLineArgumentProvider</code> is recommended by Gradle to ensure task relocatability (<a href="https://docs.gradle.org/current/userguide/caching_java_projects.html#dealing_with_file_paths">documentation</a>):
185:  *

## mockito/mockito-core/src/main/java/org/mockito/Mockito.java:2780-2801
2780:     /**
2781:      * Verifies that no interactions happened on given mocks.
2782:      * <pre class="code"><code class="java">
2783:      *   verifyNoInteractions(mockOne, mockTwo);
2784:      * </code></pre>
2785:      * This method will also detect invocations
2786:      * that occurred before the test method, for example: in <code>setUp()</code>, <code>&#064;Before</code> method or in constructor.
2787:      * Consider writing nice code that makes interactions only in test methods.
2788:      * <p>
2789:      * See also {@link Mockito#never()} - it is more explicit and communicates the intent well.
2790:      * <p>
2791:      * See examples in javadoc for {@link Mockito} class
2792:      *
2793:      * @param mocks to be verified
2794:      * @since 3.0.1
2795:      */
2796:     public static void verifyNoInteractions(Object... mocks) {
2797:         MOCKITO_CORE.verifyNoInteractions(mocks);
2798:     }
2799: 
2800:     /**
2801:      * Use <code>doThrow()</code> when you want to stub the void method with an exception.
