# 2022-08-02

## IntelliJ 2022.2 support

Diffblue is excited to announce that we now support the brand new IntelliJ 2022.2 release - IntelliJ IDEA Community Edition 2022.2 and IntelliJ IDEA Ultimate 2022.2 In keeping with our policy of supporting the current and the previous releases, we now support IntelliJ 2022.2 and IntelliJ 2022.1.

## Mockito static mocking

In this release, we introduce support for Mockito static mocking using the new \`–mock-static\` option. This feature enables the mocking of static methods of the specified classes in created tests using \`Mockito.mockStatic\`. To use this feature, you must have Mockito 3.4.0 or above. Full documentation is provided here: [https://docs.diffblue.com/knowledge-base/cli/mock-static](https://github.com/diffblue/website-docs/blob/develop/knowledge-base/cli/mock-static/README.md)

## New CLI environment variables option

You can now set environment variables in Cover using the `--environment` option. For full details please see our user manual: [https://docs.diffblue.com/knowledge-base/cli/cli-manual/#environment](https://github.com/diffblue/website-docs/blob/develop/knowledge-base/cli/cli-manual/README.md#environment)

## Developer Edition trial available

We are delighted to now offer a 14-day trial version of our Developer Edition, which includes the Diffblue Cover CLI, as part of our new licensing option. We're really excited that you can now "try before you buy"! To download your trial of Diffblue Cover Developer Edition, please [click here](https://www.diffblue.com/try-cover?cover_plan_selected=Developer). Full information on all our options is also available [here](https://diffblue.com/pricing).

## How do I automatically maintain all of these tests?

![](https://info.diffblue.com/hubfs/PluginPopup/ci-workflow.gif)

Use Diffblue Cover on any CI platform to automatically update your unit tests and catch regressions for every commit - watch [this video](https://www.diffblue.com/video-demo/?utm_source=Plugin\&utm_medium=Whatsnew\&utm_campaign=WhatsNewBox) to learn more.

## Enhancements

* IntelliJ Plugin: Cover now supports IntelliJ IDEA Community Edition 2022.2 and IntelliJ IDEA Ultimate 2022.2. \[Ref: TG-17517]
* IntelliJ Plugin: Cover now avoids writing duplicate tests when 'Write Tests' executed on the same method/class/package. \[Ref: TG-17504]
* IntelliJ Plugin: Cover now displays and updates the 'Write Test' flask gutter icons quicker. \[Ref: TG-17461]
* IntelliJ Plugin: Cover now spends less time indexing on Java 11 and Java 17 projects. \[Ref: TG-15538]
* CLI: Cover now allows environment values to be specified via the `--environment` option. \[Ref: TG-17472]
* CLI: Cover now supports Mockito static mocking via the `--mock-static` option. This feature enables the mocking of the static methods of the specified classes in created tests using `Mockito.mockStatic`. Requires Mockito 3.4.0 and above. \[Ref: TG-17399]
* CLI: Cover now outputs more precise recommendations when JUnit dependencies are missing, mismatched or unsupported. \[Ref: TG-17230]
* Cover now writes tests, when mocks need to be used, where it previously may have failed with an `R002` (Missing observers). \[Ref: TG-16610]

## Resolved Issues

* CLI: Resolved an issue which caused Cover to exit with an error (`Command could not be completed [...]: Maven application directory was not specified`) when Maven was not installed. \[Ref: TG-17632]
* IntelliJ Plugin: Resolved an issue which caused Cover to not use IntelliJ IDEA's proxy authentication settings. \[Ref: TG-17339]
* CLI: Resolved an issue which caused Cover to be unable to resolve subprojects in a Gradle multi-module project. \[Ref: TG-17544]
* CLI: Resolved an issue which, in some circumstances, Cover would encounter a `StackOverflowError`. \[Ref: TG-17519]
* Resolved an issue which, in some circumstances, caused Cover to write tests containing many calls to copy constructors. \[Ref: TG-17520]
* Resolved an issue which caused Cover to not track Generic Type Arguments when choosing factories. \[Ref: TG-17478]
* Resolved an issue which caused Cover to provide type parameters to outer classes of non-static inner classes. \[Ref: TG-17465]

## Known Issues

* CLI: The command `dcover clean --failing` does not work on Gradle projects. This command is now deprecated and `dcover validate` should be used instead. \[Ref: TG-11707]
* For multi-module projects, `--coverage-reports` needs to be run in the sub-modules, not from root module with `--working-directory`. \[Ref: TG-16876]


---

# 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/2022-08-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.
