### Question:
TransactUtils { public static <T extends TableSchema<T>> void stampInstanceIdentifier(TransactionBuilder transaction, InstanceIdentifier<?> iid, TableSchema<T> tableSchema, ColumnSchema<T, Map<String, String>> columnSchema, InstanceIdentifierCodec instanceIdentifierCodec) { transaction.add( stampInstanceIdentifierMutation(transaction, iid, tableSchema, columnSchema, instanceIdentifierCodec)); } 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 testStampInstanceIdentifier() { TransactionBuilder transaction = mock(TransactionBuilder.class); InstanceIdentifier<?> iid = mock(InstanceIdentifier.class); TableSchema<GenericTableSchema> tableSchema = mock(TableSchema.class); ColumnSchema<GenericTableSchema, Map<String,String>> columnSchema = mock(ColumnSchema.class); InstanceIdentifierCodec instanceIdentifierCodec = mock(InstanceIdentifierCodec.class); PowerMockito.doReturn(mock(Mutate.class)).when(TransactUtils.class); TransactUtils.stampInstanceIdentifierMutation(transaction, iid, tableSchema, columnSchema, instanceIdentifierCodec); when(transaction.add(any(Operation.class))).thenReturn(transaction); TransactUtils.stampInstanceIdentifier(transaction, iid, tableSchema, columnSchema, instanceIdentifierCodec); verify(transaction).add(any(Operation.class)); }