Search in sources :

Example 1 with ListUtils

use of no.mnemonic.commons.utilities.collections.ListUtils in project act-platform by mnemonic-no.

the class AbstractGraphTest method mockFact.

UUID mockFact(FactEntity.FactObjectBinding binding) {
    UUID factID = UUID.randomUUID();
    UUID typeID = UUID.randomUUID();
    when(factManager.getFact(factID)).thenReturn(new FactEntity().setId(factID).setTypeID(typeID).setValue("value").setInReferenceToID(UUID.fromString("00000000-0000-0000-0000-000000000001")).setOrganizationID(UUID.fromString("00000000-0000-0000-0000-000000000002")).setOriginID(UUID.fromString("00000000-0000-0000-0000-000000000003")).setTrust(0.3f).setConfidence(0.5f).setAccessMode(AccessMode.Public).setTimestamp(123456789).setLastSeenTimestamp(987654321).setBindings(ObjectUtils.ifNotNull(binding, ListUtils::list, ListUtils.list())));
    when(factManager.getFactType(typeID)).thenReturn(new FactTypeEntity().setId(typeID).setName("type"));
    return factID;
}
Also used : UUID(java.util.UUID) ListUtils(no.mnemonic.commons.utilities.collections.ListUtils)

Aggregations

UUID (java.util.UUID)1 ListUtils (no.mnemonic.commons.utilities.collections.ListUtils)1