3

The location of Springockito's mockito.xsd seems to be broken.

We used
xsi:schemaLocation="http://www.mockito.org/spring/mockito https://bitbucket.org/kubek2k/springockito/raw/tip/springockito/src/main/resources/spring/mockito.xsd

But this does not work any longer. Does anyone know of a current URI?

schoenk
  • 824
  • 3
  • 13
  • 31

3 Answers3

2

Looks like kubek2k's bitbucket repo is no longer accessible. Luckily someone made a github mirror here.

Given that this repo is no longer accessible, a better / more permanent solution might be to create a local copy of mockito.xsd in your src/main/resources directory, and reference that instead.

For example, create src/main/resources/META-INF/spring/mockito.xsd and change the xsd reference from:

....
http://www.mockito.org/spring/mockito https://bitbucket.org/kubek2k/springockito/raw/tip/springockito/src/main/resources/spring/mockito.xsd">

to

...
http://www.mockito.org/spring/mockito META-INF/spring/mockito.xsd">

update 10-05-2016:

  • There's also a fork here -- it's based off version 1.0.7 from what I can see (which is more recent than Angellnc's github mirror above).
  • And another fork here (this one is actually a mirror, but still 1.0.7)

update 10-05-2016 2:

Looks like there a 1.0.9 version also hosted here: https://bitbucket.org/duncan85/springockito/

jlb
  • 19,090
  • 8
  • 34
  • 65
2

New repo location

The difference between the version in github (see first answer) and this one is the additional boolean attribute (useStaticMap) on the 'mock' element. In our case the test were failing because mockito was expecting that boolean value in.

Jan
  • 21
  • 1
0

I am also facing the same problem and it works for me by changing xsi:schemaLocation to either "https://raw.githubusercontent.com/AngelInc/Springockito/master/src/main/resources/spring/mockito.xsd" or "http://www.mockito.org/spring/mockito.xsd".