* Makes sure client does not have offline access if not allowed to have refresh tokens.
*/
@Test
public void saveNewClient_noOfflineAccess() {
ClientDetailsEntity client = Mockito.mock(ClientDetailsEntity.class);
Mockito.when(client.getId()).thenReturn(null);
Mockito.when(client.isAllowRefresh()).thenReturn(false);
// scopes returned by client entities are Strings
@SuppressWarnings("unchecked")
Set<String> scopes = Mockito.mock(Set.class);
Mockito.when(client.getScope()).thenReturn(scopes);
service.saveNewClient(client);
Mockito.verify(scopes).remove(SystemScopeService.OFFLINE_ACCESS);
}