MidtransServiceManager extends BaseServiceManager { public void setService(MidtransApiService service) { this.service = service; } MidtransServiceManager(MidtransApiService service); void cardRegistration(String cardNumber,
                                 String cardCvv,
                                 String cardExpMonth,
                                 String cardExpYear, String clientKey, final CardRegistrationCallback callback); void getToken(CardTokenRequest cardTokenRequest, final CardTokenCallback callback); void setService(MidtransApiService service);  }
@Test public void getBankPointsFailure_whenServiceNull() { midtransServiceManager.setService(null); callbackImplement.registerCard(SDKConfigTest.CARD_NUMBER, SDKConfigTest.CARD_CVV, SDKConfigTest.CARD_EXPIRY_MONTH, SDKConfigTest.CARD_EXPIRY_YEAR, SDKConfigTest.CLIENT_KEY); Mockito.verify(callbackCollaboratorMock).onError(); }
@Test public void getCardToken_whenServiceNull() { CardTokenRequest req = new CardTokenRequest(); midtransServiceManager.setService(null); callbackImplement.getCardToken(req); Mockito.verify(callbackCollaboratorMock).onError(); }