@Test public void shouldFindContextIsUsed() { final String CONTEXT_ID = "contextId"; given(identityRepository.contextIsUsed(CONTEXT_ID)).willReturn(true); assertTrue(identityService.contextIsUsed(CONTEXT_ID)); }
public boolean contextIsUsed(String contextId) { return identityRepository.contextIsUsed(contextId); }
IdentityService { public boolean contextIsUsed(String contextId) { return identityRepository.contextIsUsed(contextId); } }
IdentityService { public boolean contextIsUsed(String contextId) { return identityRepository.contextIsUsed(contextId); } IdentityService(IdentityRepository identityRepository); }
IdentityService { public boolean contextIsUsed(String contextId) { return identityRepository.contextIsUsed(contextId); } IdentityService(IdentityRepository identityRepository); void createIdentity(IdentityInsertModel identityInsertModel); Optional<IdentityModel> linkContextToIdentity(IdentityInsertModel identityInsertModel); Optional<IdentityModel> findIdentity(byte[] certificate); boolean contextIsUsed(String contextId); }
IdentityService { public boolean contextIsUsed(String contextId) { return identityRepository.contextIsUsed(contextId); } IdentityService(IdentityRepository identityRepository); void createIdentity(IdentityInsertModel identityInsertModel); Optional<IdentityModel> linkContextToIdentity(IdentityInsertModel identityInsertModel); Optional<IdentityModel> findIdentity(byte[] certificate); boolean contextIsUsed(String contextId);  }