### Question:
TransactUtils { public static <T extends DataObject> Map<InstanceIdentifier<T>,T> extractOriginal( DataChangeEvent changes, Class<T> klazz) { return extract(changes.getOriginalData(),klazz); } private  TransactUtils(); static Map<InstanceIdentifier<Node>,Node> extractNode(
            Map<InstanceIdentifier<?>, DataObject> changes); static Map<InstanceIdentifier<T>,T> extractCreated(
            DataChangeEvent changes, Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractCreated(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>,T> extractUpdated(
            DataChangeEvent changes, Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractUpdated(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>, T> extractCreatedOrUpdated(
            Collection<DataTreeModification<U>> changes, Class<T> clazz,
            Predicate<DataObjectModification<T>> filter); static Map<InstanceIdentifier<T>,T> extractCreatedOrUpdated(
            DataChangeEvent changes,Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractCreatedOrUpdated(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>, T> extractCreatedOrUpdatedOrRemoved(
            DataChangeEvent changes, Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractCreatedOrUpdatedOrRemoved(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>,T> extractOriginal(
            DataChangeEvent changes, Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractOriginal(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Set<InstanceIdentifier<T>> extractRemoved(
            DataChangeEvent changes, Class<T> klazz); static Set<InstanceIdentifier<T>> extractRemoved(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>, T> extractRemovedObjects(
            DataChangeEvent changes, Class<T> klazz); static Map<InstanceIdentifier<T>, T> extractRemovedObjects(
            Collection<DataTreeModification<U>> changes, Class<T> clazz); static Map<InstanceIdentifier<T>,T> extract(
            Map<InstanceIdentifier<?>, DataObject> changes, Class<T> klazz); static List<Insert> extractInsert(TransactionBuilder transaction, GenericTableSchema schema); static UUID extractNamedUuid(Insert insert); static void stampInstanceIdentifier(TransactionBuilder transaction,
            InstanceIdentifier<?> iid, TableSchema<T> tableSchema, ColumnSchema<T, Map<String, String>> columnSchema,
            InstanceIdentifierCodec instanceIdentifierCodec); static Mutate<T> stampInstanceIdentifierMutation(TransactionBuilder transaction,
            InstanceIdentifier<?> iid, TableSchema<T> tableSchema, ColumnSchema<T, Map<String, String>> columnSchema,
            InstanceIdentifierCodec instanceIdentifierCodec); static String bytesToHexString(byte[] bytes);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testExtractOriginal() { DataChangeEvent changes = mock(DataChangeEvent.class); Class<DataObject> klazz = DataObject.class; Map<InstanceIdentifier<?>, DataObject> map = new HashMap<>(); when(changes.getOriginalData()).thenReturn(map); when(TransactUtils.extract(any(Map.class),eq(DataObject.class))).thenReturn(new HashMap<>()); assertEquals(map, TransactUtils.extractCreated(changes, klazz)); }