use of org.codice.ddf.cxf.client.ClientBuilder in project ddf by codice.
the class SolrRestTest method setUp.
@Before
public void setUp() {
EncryptionService encryptionService = mock(EncryptionService.class);
when(encryptionService.decrypt(anyString())).thenReturn("test");
ClientBuilderFactory clientBuilderFactory = mock(ClientBuilderFactory.class);
SecureCxfClientFactory secureCxfClientFactory = mock(SecureCxfClientFactory.class);
ClientBuilder clientBuilder = new ClientBuilderImpl(mock(OAuthSecurity.class), mock(SamlSecurity.class), mock(SecurityLogger.class), mock(SecurityManager.class)) {
@Override
public SecureCxfClientFactory build() {
return secureCxfClientFactory;
}
};
when(clientBuilderFactory.getClientBuilder()).thenReturn(clientBuilder);
solrRest = new SolrRest(clientBuilderFactory, encryptionService);
}
Aggregations