@Test
public void testFindAddConsentOrganizationalProviderDtoByUsername() {

	// Arrange
	final String username = "TheUsername";
	Patient patient = mock(Patient.class);
	when(patientRepository.findByUsername(username)).thenReturn(patient);
	OrganizationalProvider provider1 = mock(OrganizationalProvider.class);
	OrganizationalProvider provider2 = mock(OrganizationalProvider.class);
	Set<OrganizationalProvider> providerSet = new HashSet();
	providerSet.add(provider1);
	providerSet.add(provider2);
	when(patient.getOrganizationalProviders()).thenReturn(providerSet);
	AddConsentOrganizationalProviderDto providerDto1 = mock(AddConsentOrganizationalProviderDto.class);
	AddConsentOrganizationalProviderDto providerDto2 = mock(AddConsentOrganizationalProviderDto.class);
	when(
			modelMapper.map(provider1,
					AddConsentOrganizationalProviderDto.class)).thenReturn(
			providerDto1);
	when(
			modelMapper.map(provider2,
					AddConsentOrganizationalProviderDto.class)).thenReturn(
			providerDto2);
	// Act
	List<AddConsentOrganizationalProviderDto> result = sut
			.findAddConsentOrganizationalProviderDtoByUsername(username);
	// Assert
	// Assert
	assertEquals(2, result.size());
	for (AddConsentOrganizationalProviderDto providerDto : result) {
		assertTrue(providerDto == providerDto1
				|| providerDto == providerDto2);
	}
	assertTrue(result.get(0) != result.get(1));
}