@Test
public void notPermitUpdateAnAccessTokenWithInexistentApp() {

     thrown.expect(BadRequestException.class);
     thrown.expectMessage("App does not exist");
     
     AccessTokenPersist accessTokenPersist = new AccessTokenPersist();
     accessTokenPersist.setApp(new ReferenceIdDTO(10L));
     
     AccessToken recoverAt = new AccessToken();
     recoverAt.setCode("123456");
     
     Mockito.when(accessTokenRepository.findOne(Mockito.anyLong())).thenReturn(recoverAt);
     Mockito.when(appRespository.findOne(Mockito.anyLong())).thenReturn(null);
     
     service.update(10L, accessTokenPersist);
}