private String computeAuthorizationToken() { return client.login() .toString(); }
@Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); this.spaceGetter = new CFOptimizedSpaceGetter(restTemplateFactory); when(restTemplateFactory.getRestTemplate(client)).thenReturn(restTemplate); when(client.login()).thenReturn(new DefaultOAuth2AccessToken(DUMMY)); when(client.getCloudControllerUrl()).thenReturn(new URL(CONTROLLER_URL)); }