FossologyHandler implements FossologyService.Iface { @Override public RequestStatus setFingerPrints(List<FossologyHostFingerPrint> fingerPrints) throws TException { return fossologyHostKeyHandler.setFingerPrints(fingerPrints); } @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 testSetFingerPrints() throws Exception { @SuppressWarnings("unchecked") final List<FossologyHostFingerPrint> newFingerPrints = mock(List.class); final RequestStatus requestStatus = RequestStatus.FAILURE; doReturn(requestStatus).when(fossologyHostKeyHandler).setFingerPrints(newFingerPrints); assertThat(fossologyHandler.setFingerPrints(newFingerPrints), sameInstance(requestStatus)); verify(fossologyHostKeyHandler).setFingerPrints(newFingerPrints); }