0

I am writing a test for which having a Jenkins instance . so I need to mock the Jenkins class and set the instance to Jenkins. What is the method to set the instance?

Import jenkins.model.Jenkins

  • Please learn [how to ask a question on SO](https://stackoverflow.com/help/how-to-ask) and provide a [minimal, complete, and verifiable example](https://stackoverflow.com/help/mcve). Nobody here has a magic crystal globe. Thank you. – kriegaex Jan 04 '23 at 21:25
  • The method has Jenkins.get() to get the Jenkins instance Now in spock ,I need to mock Jenkins class and set the instance back to Jenkins, how to set the instance – Prabagaran Sellamuthu Jan 04 '23 at 23:50

0 Answers0