# Could not find method testImplementation() for arguments [junit:junit:4.13.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

- **ID:** `java/gradle-missing-test-framework`
- **Domain:** java
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The 'testImplementation' configuration is used in a project that does not apply the Java plugin, which provides the test configurations.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7+ | active | — | — |

## Workarounds

1. **Apply the Java plugin to the project** (95% success)
   ```
   plugins { id 'java' }
   ```
2. **Use the 'test' configuration if the Java plugin is not desired (deprecated)** (70% success)
   ```
   testCompile 'junit:junit:4.13.2' (though deprecated, works in older Gradle)
   ```

## Dead Ends

- **Adding testImplementation to the root project without applying the Java plugin** — The test configuration is only available after applying the Java plugin. (90% fail)
- **Using compileOnly instead of testImplementation** — compileOnly does not include the dependency in the test classpath. (85% fail)
