use of eu.europa.ec.fisheries.wsdl.asset.types.Asset in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityServiceBeanTest method testEnrichVesselDetailsAndContactPartiesForFishingTrip.
@Test
@SneakyThrows
public void testEnrichVesselDetailsAndContactPartiesForFishingTrip() {
Map<String, List<String>> returnMap = new HashMap<>();
returnMap.put("code", new ArrayList<String>());
when(vesselTransportMeansDao.findLatestVesselByTripId(Mockito.anyString())).thenReturn(new VesselTransportMeansEntity());
when(mdrModuleServiceBean.getAcronymFromMdr("FLUX_VESSEL_ID_TYPE", "*", new ArrayList<String>(), 9999999, "code")).thenReturn(returnMap);
List<Asset> listAssetResponse = new ArrayList<>();
Asset asset = new Asset();
asset.setCfr("UPDATED_CFR");
asset.setIrcs("UPDATED_IRCS");
asset.setImo("UPDATED_IMO");
asset.setName("name");
listAssetResponse.add(asset);
when(assetModule.getAssetListResponse(Mockito.any(AssetListQuery.class))).thenReturn(listAssetResponse);
VesselDetailsDTO vesselDetailsDTO = fishingTripService.getVesselDetailsForFishingTrip("NOR-TRP-20160517234053706");
assertNotNull(vesselDetailsDTO);
}
Aggregations