Why I am getting package com.atlassian.jira.mock.component does not exist

Hi,

Apologies , if it is not the right forum for this question. I am writing unit tests for my plugin and want to use
MockComponentWorker, but whenever I am importing MockComponentWorker
as import com.atlassian.jira.mock.component.MockComponentWorker;
I am getting error that package doesn’t exists, what am I missing?

Regards
A

Try adding

<dependency>
     <groupId>com.atlassian.jira</groupId>
     <artifactId>jira-tests</artifactId>
     <version>7.8.0-SNAPSHOT</version>
     <scope>test</scope>
</dependency>

To your pom.xml – replace the JIRA version with whatever version you are targetting.