Код: Выделить всё
public List
getBEntityId(List gBEntities, BigInteger partId) {
List partGEntityList = new ArrayList();
if(!CollectionUtils.isEmpty(gBEntities)) {
gBEntities.forEach(gBEntityDTO -> {
PartGEntity partGEntity = createPartGEntity(
statClient.getBEntityByAnetId(gBEntityDTO.getAnetId()));
partGEntity.setPartyId(partyId);
partGEntityList.add(partGEntity);
});
}
return partGEntityList;
}
Код: Выделить всё
BEntityDTO bEntityByAnetId = new BEntityDTO();
bEntityByAnetId.setAnetId("5738");
bEntityByAnetId.setEffectiveDate(new Date());
when(statClient.getBEntityByAnetId("5738")).thenReturn(bEntityByAnetId);
when(partGEntityDS.getBEntityId(newBEntityList,partId)).thenReturn(partGEntityList);
Код: Выделить всё
createPartGEntity(statClient.getBEntityByAnetId(gBEntityDTO.getAnetId()));
Любая помощь по этому вопросу очень ценится.
Заранее спасибо
Подробнее здесь: https://stackoverflow.com/questions/788 ... below-code