@Test
public void testMap_when_mapping_OrganizationalProvidersPermittedToDisclose() {

	// Arrange
	Consent consent = new Consent();
	setDataBasicConsent(consent);
	// set providers
	Set<ConsentOrganizationalProviderPermittedToDisclose> organizationalProvidersPermittedToDisclose = new HashSet<ConsentOrganizationalProviderPermittedToDisclose>();
	List<OrganizationalProvider> orgProviders = setDataOrgProviders();
	for (OrganizationalProvider organizationalProvider : orgProviders) {
		ConsentOrganizationalProviderPermittedToDisclose consentOrganizationalProviderPermittedToDisclose = new ConsentOrganizationalProviderPermittedToDisclose(
				organizationalProvider);
		organizationalProvidersPermittedToDisclose
				.add(consentOrganizationalProviderPermittedToDisclose);
	}
	consent.setOrganizationalProvidersPermittedToDisclose(organizationalProvidersPermittedToDisclose);
	// Act
	ConsentDto consentDto = sut.map(consent);
	// Assert
	assertEquals(consent.getProvidersPermittedToDisclose().getClass(),
			consentDto.getProvidersPermittedToDisclose().getClass());
	assertEquals(consent.getProvidersPermittedToDisclose().size(),
			consentDto.getProvidersPermittedToDisclose().size());
	for (ConsentOrganizationalProviderPermittedToDisclose pdmt : consent
			.getOrganizationalProvidersPermittedToDisclose()) {
		String consentNpi = pdmt.getOrganizationalProvider().getNpi();
		for (OrganizationalProviderDto organizationalPermittedToDisclose : consentDto
				.getOrganizationalProvidersPermittedToDisclose()) {
			String consentDtoNpi = organizationalPermittedToDisclose
					.getNpi();
			if (!consentNpi.equalsIgnoreCase(consentDtoNpi)) {
				continue;
			}
			assertEquals(pdmt.getOrganizationalProvider().getOrgName(),
					organizationalPermittedToDisclose.getOrgName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressCityName(),
					organizationalPermittedToDisclose
							.getPracticeLocationAddressCityName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressStateName(),
					organizationalPermittedToDisclose
							.getPracticeLocationAddressStateName());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressCountryCode(),
					organizationalPermittedToDisclose
							.getPracticeLocationAddressCountryCode());
			assertEquals(pdmt.getOrganizationalProvider()
					.getSecondLinePracticeLocationAddress(),
					organizationalPermittedToDisclose
							.getSecondLinePracticeLocationAddress());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressPostalCode(),
					organizationalPermittedToDisclose
							.getPracticeLocationAddressPostalCode());
			assertEquals(pdmt.getOrganizationalProvider()
					.getPracticeLocationAddressStateName(),
					organizationalPermittedToDisclose
							.getPracticeLocationAddressStateName());
		}
	}
}