# 2023-06-02

This release includes enhancements to error reporting and code styling. See the Release Notes below for details of all product updates and enhancements in this release.

## Enhancements

* Refactor: Diffblue Cover Refactor now produces patch files that match the code style of the project. \[Ref: TG-19215]
* CLI: Diffblue Cover's environment checks now provide a warning if the Jakarta project under test, using JUnit 5, is missing the `mockito-junit-jupiter` dependency. \[Ref: TG-19112]
* CLI: Diffblue Cover now reports an ERROR if `--mock-static` is used to write tests for a project without the `mockito-inline` dependency. \[Ref: TG-18398]
* CLI & Plugin: Diffblue Cover can now use the Mockito framework to test projects using Jakarta Context Dependency Injection (CDI). \[Ref: TG-19110]
* CLI & Plugin: Diffblue Cover's environment checks now ensure that suitable `junit-jupiter-engine`, `junit-jupiter-api` and `junit-vintage-engine` dependencies are present when required. \[Ref: TG-19336]
* CLI & Reports: Diffblue Cover now provides additional guidance and remediation advice when executing `dcover create --coverage-reports` on a Gradle project without `useJunitPlatform()` in the `build.gradle` file. \[Ref: TG-19178]

## Resolved Issues

* CLI: Resolved an issue which caused Diffblue Cover to disable test verification when `--skip-test-validation` was specified. \[Ref: TG-19217]
* CLI & Plugin: Resolved an issue which caused Diffblue Cover to write tests using mocking for POJO-like interfaces where a suitable implementation was available. \[Ref: TG-19161]
* CLI & Plugin: Resolved an issue which, in some circumstances, caused Diffblue Cover to write unused `when .. thenReturn` mocks which could cause an `UnnecessaryStubbingException`. \[Ref: TG-19113]
* CLI & Plugin: Resolved an issue which could cause Diffblue Cover to report an incorrect version of `junit-vintage-engine` detected in the user's environment. \[Ref: TG-19335]
* CLI & Plugin: Fixed an issue where Diffblue Cover could not use `MockitoJUnitRunner` in tests with Mockito 2.22.0+. Also fixed an issue where Diffblue Cover would attempt to use `MockitoExtension` when it was not on the classpath which resulted in fewer tests. \[Ref: TG-19111]
* CLI & Reports: Resolved an issue which caused Diffblue Cover CLI to report `E098` while uploading a reports bundle containing inconsistencies. Diffblue Cover now uploads the bundle successfully and logs the inconsistency. \[Ref: TG-19326]
* Reports: Resolved an issue which, in some circumstances, caused Diffblue Cover to incorrectly report lines which are excluded by Diffblue Cover and those that are not covered. Upgrade to 2023.06.02 and upload a new reports bundle to correct any previously inaccurate counts. \[Ref: TG-19363]
* Reports: Resolved an issue which caused Diffblue Cover to sort dates incorrectly on telemetry dashboards. \[Ref: TG-19189]
* Optimize: Resolved an issue where executing `dcover optimize --patch-file=patch.file` may result in unexpected, unhandled exceptions in Windows. \[Ref: TG-19348]

## Known Issues

* CLI & Plugin: Diffblue Cover may produce tests for JUnit 4.10 and lower that do not compile due to the use of `assertNotEquals`. \[Ref: TG-17605]
* IntelliJ Plugin: Upgrading to IntelliJ IDEA 2022.3 may, in some circumstances, cause existing run configurations to no longer produce tests. Removing any run configurations for that entity and writing tests again will recreate a working run configuration. \[Ref: TG-18282]


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cover-docs-preview.diffblue.com/updates-and-upgrades/release-archive/2023-06-02.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
