Skip to content

Commit e42725a

Browse files
committed
fixed junit
1 parent f0ca290 commit e42725a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

java/src/test/java/com/cybersource/ws/client/IdentityTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void setUp() throws Exception {
3030
}
3131

3232
@Test
33-
public void testSetUpMerchant() throws InstantiationException, IllegalAccessException, SignException, ConfigException{
33+
public void testSetUpMerchant() throws SignException, ConfigException{
3434
File p12file = Mockito.mock(File.class);
3535
MerchantConfig mc = Mockito.mock(MerchantConfig.class);
3636

@@ -43,9 +43,11 @@ public void testSetUpMerchant() throws InstantiationException, IllegalAccessExce
4343
Mockito.when(principal.getName()).thenReturn(keyAlias);
4444

4545
Mockito.when(mc.getKeyFile()).thenReturn(p12file);
46+
Mockito.when(mc.getKeyPassword()).thenReturn("testPwd");
4647
Identity identity = new Identity(mc,x509Cert,pkey,logger);
4748
assertEquals(identity.getName(), mc.getMerchantID());
4849
assertEquals(identity.getSerialNumber(), "400000009910179089277");
50+
assertEquals(String.valueOf(identity.getPswd()), "testPwd");
4951
assertNotNull(identity.getPrivateKey());
5052
}
5153

0 commit comments

Comments
 (0)