Need help understanding why a negated conditional survived in Pitest

2.6k views Asked by At

According to the Pitest report, the following negated conditional has survived

enter image description here

Why I find this odd is because I have 2 unit tests, one testing condition where channelType does equal WEB and another unit test where channelType equals MOBILE. What am I missing here?

@Test
void process() {
  AutoDepositRegistration autoDepositRegistration = createDefaultAutoDepositRegistration(RegistrationActions.ADD_AUTO_DEPOSIT_REGISTRATION,
          AutoDepositRegistration.ChannelTypeEnum.WEB);
  ResponseEntity<CreateAccountAliasRegistrationResponse> responseEntity = createResponseEntity();

  when(messageService.forwardToStream(eq(MessageType.AUTODEPOSITREGISTRATION.getValue()), any(), any(), any())).thenReturn(true);
  when(faultToleranceInteracRegistrationClient.createAccountAliasRegistration(any(), any(), any(), any(ChannelIndicator.class),
          any(), any(), any(), any(), any(), any())).thenReturn(responseEntity);

  addAutoDepositRegistration.process(autoDepositRegistration);

  assertNull(autoDepositRegistration.getError());
  assertEquals(PROCESSED, autoDepositRegistration.getAutoDepositRegistrationStatus());
  assertEquals(ACCOUNT_ALIAS_REFERENCE, autoDepositRegistration.getAutoDepositRegistrationInfos().get(0).getAutoDepositRegistrationId());
}

@Test
void process_clientType_mobile() {
  AutoDepositRegistration autoDepositRegistration = createDefaultAutoDepositRegistration(RegistrationActions.ADD_AUTO_DEPOSIT_REGISTRATION,
          AutoDepositRegistration.ChannelTypeEnum.MOBILE);
  ResponseEntity<CreateAccountAliasRegistrationResponse> responseEntity = createResponseEntity();

  when(messageService.forwardToStream(eq(MessageType.AUTODEPOSITREGISTRATION.getValue()), any(), any(), any())).thenReturn(true);
  when(faultToleranceInteracRegistrationClient.createAccountAliasRegistration(any(), any(), any(), any(ChannelIndicator.class),
          any(), any(), any(), any(), any(), any())).thenReturn(responseEntity);

  addAutoDepositRegistration.process(autoDepositRegistration);

  assertNull(autoDepositRegistration.getError());
  assertEquals(PROCESSED, autoDepositRegistration.getAutoDepositRegistrationStatus());
  assertEquals(ACCOUNT_ALIAS_REFERENCE, autoDepositRegistration.getAutoDepositRegistrationInfos().get(0).getAutoDepositRegistrationId());
}
0

There are 0 answers