diff --git a/src/test/java/co/rsk/federate/signing/ECDSASignerFactoryTest.java b/src/test/java/co/rsk/federate/signing/ECDSASignerFactoryTest.java index 23bace85..154df771 100644 --- a/src/test/java/co/rsk/federate/signing/ECDSASignerFactoryTest.java +++ b/src/test/java/co/rsk/federate/signing/ECDSASignerFactoryTest.java @@ -116,13 +116,12 @@ void buildFromConfigHSM() throws SignerException { } @Test - void buildFromConfigUnknown() throws SignerException { + void buildFromConfigUnknown() { Config configMock = mockConfig("a-random-type"); - SignerConfig signerConfig = new SignerConfig("a-random-id", configMock); try { - factory.buildFromConfig(signerConfig); + new SignerConfig("a-random-id", configMock); fail(); - } catch (RuntimeException e) { + } catch (IllegalArgumentException e) { assertEquals("Unsupported signer type: a-random-type", e.getMessage()); } }