26
26
import static tech .pegasys .teku .infrastructure .http .HttpStatusCodes .SC_UNAUTHORIZED ;
27
27
import static tech .pegasys .teku .infrastructure .restapi .MetadataTestUtil .getResponseStringFromMetadata ;
28
28
import static tech .pegasys .teku .infrastructure .restapi .MetadataTestUtil .verifyMetadataErrorResponse ;
29
+ import static tech .pegasys .teku .spec .generator .signatures .NoOpLocalSigner .NO_OP_SIGNER ;
29
30
30
31
import com .fasterxml .jackson .core .JsonProcessingException ;
31
32
import java .io .IOException ;
36
37
import tech .pegasys .teku .infrastructure .http .HttpErrorResponse ;
37
38
import tech .pegasys .teku .infrastructure .restapi .StubRestApiRequest ;
38
39
import tech .pegasys .teku .spec .TestSpecFactory ;
39
- import tech .pegasys .teku .spec .signatures .Signer ;
40
40
import tech .pegasys .teku .spec .util .DataStructureUtil ;
41
41
import tech .pegasys .teku .validator .api .Bytes32Parser ;
42
42
import tech .pegasys .teku .validator .client .OwnedKeyManager ;
@@ -62,8 +62,7 @@ void shouldGetGraffiti() throws JsonProcessingException {
62
62
.pathParameter ("pubkey" , publicKey .toHexString ())
63
63
.build ();
64
64
65
- final Validator validator =
66
- new Validator (publicKey , mock (Signer .class ), () -> Optional .of (graffiti ));
65
+ final Validator validator = new Validator (publicKey , NO_OP_SIGNER , () -> Optional .of (graffiti ));
67
66
when (keyManager .getValidatorByPublicKey (eq (publicKey ))).thenReturn (Optional .of (validator ));
68
67
69
68
handler .handleRequest (request );
@@ -83,7 +82,7 @@ void shouldGetEmptyGraffiti() throws JsonProcessingException {
83
82
.pathParameter ("pubkey" , publicKey .toHexString ())
84
83
.build ();
85
84
86
- final Validator validator = new Validator (publicKey , mock ( Signer . class ) , Optional ::empty );
85
+ final Validator validator = new Validator (publicKey , NO_OP_SIGNER , Optional ::empty );
87
86
when (keyManager .getValidatorByPublicKey (eq (publicKey ))).thenReturn (Optional .of (validator ));
88
87
89
88
handler .handleRequest (request );
0 commit comments