# 2021-06-02

## Generating assertions for objects that implement functional interfaces

Diffblue Cover now produces tests for methods that return objects with types such as `Function`, `BiFunction`, `IntPredicate` etc. It can write tests for methods returning objects whose type is a functional interface type, as defined in <https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html#package.description>.

For code written in a functional programming style, this means a significant increase in coverage.

## Shorter unique names for run configurations

Run configuration names have been shortened whilst maintaining their uniqueness. This ensures both class and method names are easier to read.\
The new standard for method names no longer includes a signature and is in the format: `simple class name . method name`.

​​​​​

## Diffblue Cover Community Edition is available for use with commercial code

Community Edition allows you to write tests for both open source and commercial code. This means you can now use Diffblue Cover Community Edition at work completely for free. Visit our documentation to learn more about how you can use Diffblue Cover at work, and also see our [End-User License Agreement](https://github.com/diffblue/website-docs/blob/develop/licenses/ce-eula/README.md){: target="\_blank" rel="noopener"}.

## Feedback

If you have feedback, questions or requests regarding the Diffblue Cover IntelliJ Plugin, please contact us on the [Community Forum](https://forum.diffblue.com/). We would love to hear about what is important to you and what you would like to see in upcoming releases.

## 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

* Cover now writes assertions for `equals` methods with unequal objects as parameters. \[Ref: TG-14662]
* Cover now writes assertions for methods with a 'functional interface' return value, such as `IntPredicate`, `Function` or `Supplier`. \[Ref: TG-13579]
* Cover now provides more understandable and user-friendly error reporting to help diagnose and resolve issues. \[Ref: TG-13589]
* CLI: The configuration file format for Cover has now been simplified, allowing command line options to be supplied in a text file, e.g. `config.txt`, which can be referenced by running `dcover create @config.txt`. This replaces the existing `--config` and `--example-config` options for supplying configuration options via a file. \[Ref: TG-14556]
* IntelliJ Plugin: Cover now creates IntelliJ IDEA ‘run configurations’ with shorter names. \[Ref: TG-14619]

## Resolved Issues

* Resolved an issue which provoked Cover to write nondeterministic tests involving `Calendar.getInstance`. \[Ref: TG-14481]
* IntelliJ Plugin: Resolved an issue which prevented Cover's 'write test' flask icon from writing tests for classes in default packages. \[Ref: TG-14757]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, whilst using Cover's 'write test' flask icon on a just-created project, provoked a `Reflection operation has failed` error. \[Ref: TG-14704]
* IntelliJ Plugin: Resolved an issue which prevented IntelliJ IDEA 'run configurations' from being created when clicking 'Write Tests' on a class from IntelliJ IDEA's top navigation bar. \[Ref: TG-14687]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, provoked an IntelliJ IDEA `NullPointerExceptions` error report. \[Ref: TG-14633]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, whilst using Cover's 'write test' flask icon, provoked an IntelliJ IDEA `IndexOutOfBoundsException` error report. \[Ref: TG-14628]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, whilst using Cover's 'write test' flask icon, provoked an IntelliJ IDEA `InvalidPathExceptions` error report. \[Ref: TG-14627]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, provoked an IntelliJ IDEA `Argument for @NotNull parameter 'module' of com/intellij/openapi/roots/ModuleRootManager.getInstance` error report. \[Ref: TG-14626]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, provoked an IntelliJ IDEA `PsiInvalidElementAccessException` error report. \[Ref: TG-14487]
* IntelliJ Plugin: Resolved an issue which, whilst writing tests for projects with `#` in their file path, provoked an IntelliJ IDEA `URI has a fragment component` error report. \[Ref: TG-13913]
* IntelliJ Plugin: Resolved an issue which, in some circumstances, provoked an IntelliJ IDEA `Document is locked by write PSI operations` error report. \[Ref: TG-13148]

## Known Issues

* CLI: `dcover clean --failing` fails when used with a Gradle project. \[Ref: TG-11707]
* IntelliJ Plugin: `Diffblue Cover was unable to create an index` error may appear if switching project happens before Cover has finished indexing. \[Ref: TG-13772]


---

# 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/2021-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.
