FossologyHandler implements FossologyService.Iface { @Override public Release getStatusInFossology(String releaseId, User user, String clearingTeam) throws TException { return fossologyFileHandler.getStatusInFossology(releaseId, user, clearingTeam); } @Autowired  FossologyHandler(FossologyFileHandler fossologyFileHandler, FossologyHostKeyHandler fossologyHostKeyHandler, FossologySshConnector fossologySshConnector, FossologyScriptsHandler fossologyScriptsHandler, FossologySettings fossologySettings); @Override RequestStatus sendToFossology(String releaseId, User user, String clearingTeam); @Override RequestStatus sendReleasesToFossology(List<String> releaseIds, User user, String clearingTeam); @Override Release getStatusInFossology(String releaseId, User user, String clearingTeam); @Override List<FossologyHostFingerPrint> getFingerPrints(); @Override RequestStatus setFingerPrints(List<FossologyHostFingerPrint> fingerPrints); @Override RequestStatus deployScripts(); @Override RequestStatus checkConnection(); @Override String getPublicKey();  }
@Test public void testGetStatusInFossology() throws Exception { final String releaseId = "a"; final String clearingTeam = "b"; final Release status = mock(Release.class); doReturn(status).when(fossologyFileHandler).getStatusInFossology(releaseId, user, clearingTeam); assertThat(fossologyHandler.getStatusInFossology(releaseId, user, clearingTeam), sameInstance(status)); verify(fossologyFileHandler).getStatusInFossology(releaseId, user, clearingTeam); }