}
private KenaiRealm getRealm()
throws Exception
{
final HttpClientFactory mockHttpClientFactory = Mockito.mock(HttpClientFactory.class);
Mockito.when(mockHttpClientFactory.create()).thenReturn(new DefaultHttpClient());
return new KenaiRealm(getKenaiRealmConfiguration(), mockHttpClientFactory);
}