Remove redundant key generation in tests

This commit is contained in:
René Pfeuffer
2018-11-30 11:26:23 +01:00
parent 205ca42e09
commit f7fc81b626
6 changed files with 19 additions and 34 deletions

View File

@@ -56,6 +56,8 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import static org.mockito.Mockito.*;
import static sonia.scm.security.SecureKeyTestUtil.createSecureKey;
import org.mockito.junit.MockitoJUnitRunner;
/**
@@ -214,12 +216,6 @@ public class JwtAccessTokenResolverTest {
.compact();
}
private SecureKey createSecureKey() {
byte[] bytes = new byte[32];
random.nextBytes(bytes);
return new SecureKey(bytes, System.currentTimeMillis());
}
private void resolveKey(SecureKey key) {
when(
keyResolver.resolveSigningKey(