@Test
public void testMap_when_mapping_OrganizationalProvidersDisclosureIsMadeTo() {

	// Arrange
	Consent consent = new Consent();
	setDataBasicConsent(consent);
	// set providers
	Set<ConsentOrganizationalProviderDisclosureIsMadeTo> OrganizationalProvidersDisclosureIsMadeTo = new HashSet<ConsentOrganizationalProviderDisclosureIsMadeTo>();
	List<OrganizationalProvider> orgProviders = setDataOrgProviders();
	for (OrganizationalProvider organizationalProvider : orgProviders) {
		ConsentOrganizationalProviderDisclosureIsMadeTo consentOrganizationalProviderDisclosureIsMadeTo = new ConsentOrganizationalProviderDisclosureIsMadeTo(
				organizationalProvider);
		OrganizationalProvidersDisclosureIsMadeTo
				.add(consentOrganizationalProviderDisclosureIsMadeTo);
	}
	consent.setOrganizationalProvidersDisclosureIsMadeTo(OrganizationalProvidersDisclosureIsMadeTo);
	// Act
	ConsentDto consentDto = sut.map(consent);
	// Assert
	assertEquals(consent.getProvidersDisclosureIsMadeTo().getClass(),
			consentDto.getProvidersDisclosureIsMadeTo().getClass());
	assertEquals(consent.getProvidersDisclosureIsMadeTo().size(),
			consentDto.getProvidersDisclosureIsMadeTo().size());
	for (ConsentOrganizationalProviderDisclosureIsMadeTo pdmt : consent
			.getOrganizationalProvidersDisclosureIsMadeTo()) {
		String consentNpi = pdmt.getOrganizationalProvider().getNpi();
		for (OrganizationalProviderDto organizationalProvidersDisclosureIsMadeTo : consentDto
				.getOrganizationalProvidersDisclosureIsMadeTo()) {
			String consentDtoNpi = organizationalProvidersDisclosureIsMadeTo
					.getNpi();
			if (!consentNpi.equalsIgnoreCase(consentDtoNpi)) {
				continue;
			}
			assertEquals(pdmt.getOrganizationalProvider().getOrgName(),
					organizationalProvidersDisclosureIsMadeTo.getOrgName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressCityName(),
					organizationalProvidersDisclosureIsMadeTo
							.getPracticeLocationAddressCityName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressStateName(),
					organizationalProvidersDisclosureIsMadeTo
							.getPracticeLocationAddressStateName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressCountryCode(),
					organizationalProvidersDisclosureIsMadeTo
							.getPracticeLocationAddressCountryCode());
			assertEquals(pdmt.getOrganizationalProvider()
					.getSecondLinePracticeLocationAddress(),
					organizationalProvidersDisclosureIsMadeTo
							.getSecondLinePracticeLocationAddress());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressPostalCode(),
					organizationalProvidersDisclosureIsMadeTo
							.getPracticeLocationAddressPostalCode());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressStateName(),
					organizationalProvidersDisclosureIsMadeTo
							.getPracticeLocationAddressStateName());
		}
	}
}