@Test
public void testMap_when_mapping_providersDisclosureIsMadeTo() {

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