Fix unit test

This commit is contained in:
René Pfeuffer
2018-10-29 10:30:17 +01:00
parent 8a07287b58
commit f1c9fe56f0

View File

@@ -14,6 +14,7 @@ import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import sonia.scm.ContextEntry;
import sonia.scm.NotFoundException;
import sonia.scm.PageResult;
import sonia.scm.user.ChangePasswordNotAllowedException;
@@ -167,7 +168,7 @@ public class UserRootResourceTest {
.content(content.getBytes());
MockHttpResponse response = new MockHttpResponse();
doThrow(ChangePasswordNotAllowedException.class).when(userManager).overwritePassword(any(), any());
doThrow(new ChangePasswordNotAllowedException(ContextEntry.ContextBuilder.entity("passwordChange", "-"), "xml")).when(userManager).overwritePassword(any(), any());
dispatcher.invoke(request, response);