@Test
public void testMap_when_mapping_ProvidersPermittedToDisclose() {

	// Arrange
	Consent consent = new Consent();
	setDataBasicConsent(consent);
	// set providers
	Set<ConsentIndividualProviderPermittedToDisclose> ProvidersPermittedToDisclose = new HashSet<ConsentIndividualProviderPermittedToDisclose>();
	List<IndividualProvider> indProviders = setDataIndividualProviders();
	for (IndividualProvider individualProvider : indProviders) {
		ConsentIndividualProviderPermittedToDisclose consentIndividualProviderPermittedToDisclose = new ConsentIndividualProviderPermittedToDisclose(
				individualProvider);
		ProvidersPermittedToDisclose
				.add(consentIndividualProviderPermittedToDisclose);
	}
	consent.setProvidersPermittedToDisclose(ProvidersPermittedToDisclose);
	// Act
	ConsentDto consentDto = sut.map(consent);
	// Assert
	assertEquals(consent.getProvidersPermittedToDisclose().getClass(),
			consentDto.getProvidersPermittedToDisclose().getClass());
	assertEquals(consent.getProvidersPermittedToDisclose().size(),
			consentDto.getProvidersPermittedToDisclose().size());
	for (ConsentIndividualProviderPermittedToDisclose pdmt : consent
			.getProvidersPermittedToDisclose()) {
		String consentNpi = pdmt.getIndividualProvider().getNpi();
		for (IndividualProviderDto indiProvidersPermittedToDisclose : consentDto
				.getProvidersPermittedToDisclose()) {
			String consentDtoNpi = indiProvidersPermittedToDisclose
					.getNpi();
			if (!consentNpi.equalsIgnoreCase(consentDtoNpi)) {
				continue;
			}
			assertEquals(pdmt.getIndividualProvider().getFirstName(),
					indiProvidersPermittedToDisclose.getFirstName());
			assertEquals(pdmt.getIndividualProvider().getLastName(),
					indiProvidersPermittedToDisclose.getLastName());
			assertEquals(pdmt.getIndividualProvider().getMiddleName(),
					indiProvidersPermittedToDisclose.getMiddleName());
			assertEquals(pdmt.getIndividualProvider().getNamePrefix(),
					indiProvidersPermittedToDisclose.getNamePrefix());
			assertEquals(pdmt.getIndividualProvider().getNameSuffix(),
					indiProvidersPermittedToDisclose.getNameSuffix());
			assertEquals(pdmt.getIndividualProvider()
					.getPracticeLocationAddressCityName(),
					indiProvidersPermittedToDisclose
							.getPracticeLocationAddressCityName());
			assertEquals(pdmt.getIndividualProvider()
					.getPracticeLocationAddressCountryCode(),
					indiProvidersPermittedToDisclose
							.getPracticeLocationAddressCountryCode());
			assertEquals(pdmt.getIndividualProvider()
					.getPracticeLocationAddressPostalCode(),
					indiProvidersPermittedToDisclose
							.getPracticeLocationAddressPostalCode());
			assertEquals(pdmt.getIndividualProvider()
					.getPracticeLocationAddressStateName(),
					indiProvidersPermittedToDisclose
							.getPracticeLocationAddressStateName());
		}
	}
}