EntityNotificationImpl implements EntityNotification { @Override public List<IStruct> getAllTraits() { return traits; } @SuppressWarnings("unused") private  EntityNotificationImpl();  EntityNotificationImpl(Referenceable entity, OperationType operationType, List<IStruct> traits);  EntityNotificationImpl(Referenceable entity, OperationType operationType, TypeSystem typeSystem); @Override IReferenceableInstance getEntity(); @Override List<IStruct> getAllTraits(); @Override OperationType getOperationType(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testGetAllTraits() throws Exception { Referenceable entity = getEntity("id"); String traitName = "MyTrait"; List<IStruct> traitInfo = new LinkedList<>(); IStruct trait = new Struct(traitName, Collections.<String, Object>emptyMap()); traitInfo.add(trait); EntityNotificationImpl entityNotification = new EntityNotificationImpl(entity, EntityNotification.OperationType.TRAIT_ADD, traitInfo); assertEquals(traitInfo, entityNotification.getAllTraits()); }