@Test
public void test_General_Case() {

	final String username = "username";
	PatientProfileDto patientDto = mock(PatientProfileDto.class);
	when(patientDto.getUsername()).thenReturn(username);
	Patient patient = mock(Patient.class);
	when(patientRepository.findByUsername(username)).thenReturn(patient);
	final String firstName = "Firstname";
	when(patientDto.getFirstName()).thenReturn(firstName);
	when(patientDto.getSocialSecurityNumber()).thenReturn("111-11-1111");
	when(patientDto.getTelephoneTelephone()).thenReturn("111-111-1111");
	when(patientDto.getAddressStreetAddressLine())
			.thenReturn("addressLine");
	when(patientDto.getAddressCity()).thenReturn("NewYork");
	when(patientDto.getAddressStateCode()).thenReturn("NY");
	when(patientDto.getAddressPostalCode()).thenReturn("11111");
	when(patientDto.getAdministrativeGenderCode()).thenReturn("M");
	LookupDto languageCode = mock(LookupDto.class);
	when(languageCode.getCode()).thenReturn("US");
	when(patientDto.getLanguageCode()).thenReturn(languageCode);
	LookupDto maritalStatusCode = mock(LookupDto.class);
	when(maritalStatusCode.getCode()).thenReturn("single");
	when(patientDto.getMaritalStatusCode()).thenReturn(maritalStatusCode);
	LookupDto raceCode = mock(LookupDto.class);
	when(raceCode.getCode()).thenReturn("Asian");
	when(patientDto.getRaceCode()).thenReturn(raceCode);
	LookupDto affiliationCode = mock(LookupDto.class);
	when(affiliationCode.getCode()).thenReturn("affi");
	when(patientDto.getReligiousAffiliationCode()).thenReturn(
			affiliationCode);
	Set<IndividualProvider> providers = new HashSet<IndividualProvider>();
	for (int i = 0; i < 3; i++) {
		IndividualProvider individualProvider = mock(IndividualProvider.class);
		providers.add(individualProvider);
	}
	when(patientDto.getIndividualProviders()).thenReturn(providers);
	Patient result = sut.map(patientDto);
	assertEquals(patient, result);
}