### Question:
DesignatorToAccountIdentifierMapper { public Optional<String> map(final @Nonnull String accountDesignator) { final Set<String> accountAssignmentGroups = IndividualLendingPatternFactory.individualLendingPattern().getAccountAssignmentGroups(); if (accountAssignmentGroups.contains(accountDesignator)) return Optional.empty(); return mapToAccountAssignment(accountDesignator) .map(AccountAssignment::getAccountIdentifier); } DesignatorToAccountIdentifierMapper(final @Nonnull DataContextOfAction dataContextOfAction);   DesignatorToAccountIdentifierMapper(
      final @Nonnull Set<ProductAccountAssignmentEntity> productAccountAssignments,
      final @Nonnull Set<CaseAccountAssignmentEntity> caseAccountAssignments,
      final @Nonnull List<AccountAssignment> oneTimeAccountAssignments); Optional<String> map(final @Nonnull String accountDesignator); String mapOrThrow(final @Nonnull String accountDesignator); Stream<GroupNeedingLedger> getGroupsNeedingLedgers(); Stream<AccountAssignment> getLedgersNeedingAccounts();  }### Answer:
@Test public void map() { Assert.assertEquals(Optional.empty(), testSubject.map(AccountDesignators.CUSTOMER_LOAN_GROUP)); Assert.assertEquals(testCase.expectedMapCustomerLoanPrincipalResult, testSubject.map(AccountDesignators.CUSTOMER_LOAN_PRINCIPAL)); Assert.assertEquals(Optional.empty(), testSubject.map("this-account-designator-doesnt-exist")); }