@Test
public void testGetSubjectMatterExpertUserNoExists()
{

    // Create a subject matter expert key.
    SubjectMatterExpertKey originalSubjectMatterExpertKey = new SubjectMatterExpertKey(USER_ID);
    SubjectMatterExpertKey updatedSubjectMatterExpertKey = new SubjectMatterExpertKey(USER_ID_2);
    // Mock the external calls.
    when(alternateKeyHelper.validateStringParameter("user id", USER_ID)).thenReturn(USER_ID_2);
    when(subjectMatterExpertDao.getSubjectMatterExpertByKey(updatedSubjectMatterExpertKey)).thenReturn(null);
    // Specify the expected exception.
    expectedException.expect(ObjectNotFoundException.class);
    expectedException.expectMessage(String.format("The subject matter expert with user id \"%s\" does not exist.", USER_ID_2));
    // Try to call the method under test.
    subjectMatterExpertServiceImpl.getSubjectMatterExpert(originalSubjectMatterExpertKey);
    // Verify the external calls.
    verify(alternateKeyHelper).validateStringParameter("user id", USER_ID);
    verify(subjectMatterExpertDao).getSubjectMatterExpertByKey(updatedSubjectMatterExpertKey);
    verifyNoMoreInteractionsHelper();
}