// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/Characteristic.java
// public interface Characteristic extends BluetoothObject {
// 
//     Set<CharacteristicAccessType> getFlags();
// 
//     boolean isNotifying();
// 
//     void disableValueNotifications();
// 
//     byte[] readValue();
// 
//     boolean writeValue(byte[] data);
// 
//     void enableValueNotifications(Notification<byte[]> notification);
// 
//     boolean isNotificationConfigurable();
// }
// 
// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/CharacteristicAccessType.java
// public enum CharacteristicAccessType {
// 
//     BROADCAST(0x01),
//     READ(0x02),
//     WRITE_WITHOUT_RESPONSE(0x04),
//     WRITE(0x08),
//     NOTIFY(0x10),
//     INDICATE(0x20),
//     AUTHENTICATED_SIGNED_WRITES(0x40),
//     EXTENDED_PROPERTIES(0x80);
// 
//     int bitField;
// 
//     CharacteristicAccessType(int bitField) {
//         this.bitField = bitField;
//     }
// 
//     public int getBitField() {
//         return bitField;
//     }
// 
//     public static CharacteristicAccessType fromBitField(int bitField) {
//         return Stream.of(CharacteristicAccessType.values())
//                 .filter(c -> c.bitField == bitField)
//                 .findFirst().orElse(null);
//     }
// 
//     public static Set<CharacteristicAccessType> parse(int flags) {
//         return Stream.of(CharacteristicAccessType.values())
//                 .filter(c -> (c.bitField & flags) > 0)
//                 .collect(Collectors.toSet());
//     }
// 
// }
// 
// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/Notification.java
// public interface Notification <T> {
// 
//     void notify(T value);
// 
// }


import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.sputnikdev.bluetooth.URL;
import org.sputnikdev.bluetooth.manager.transport.Characteristic;
import org.sputnikdev.bluetooth.manager.transport.CharacteristicAccessType;
import org.sputnikdev.bluetooth.manager.transport.Notification;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
package org.sputnikdev.bluetooth.manager.util;




public class CharacteristicEmulator {

    private Characteristic characteristic;
// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/Characteristic.java
// public interface Characteristic extends BluetoothObject {
// 
//     Set<CharacteristicAccessType> getFlags();
// 
//     boolean isNotifying();
// 
//     void disableValueNotifications();
// 
//     byte[] readValue();
// 
//     boolean writeValue(byte[] data);
// 
//     void enableValueNotifications(Notification<byte[]> notification);
// 
//     boolean isNotificationConfigurable();
// }
// 
// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/CharacteristicAccessType.java
// public enum CharacteristicAccessType {
// 
//     BROADCAST(0x01),
//     READ(0x02),
//     WRITE_WITHOUT_RESPONSE(0x04),
//     WRITE(0x08),
//     NOTIFY(0x10),
//     INDICATE(0x20),
//     AUTHENTICATED_SIGNED_WRITES(0x40),
//     EXTENDED_PROPERTIES(0x80);
// 
//     int bitField;
// 
//     CharacteristicAccessType(int bitField) {
//         this.bitField = bitField;
//     }
// 
//     public int getBitField() {
//         return bitField;
//     }
// 
//     public static CharacteristicAccessType fromBitField(int bitField) {
//         return Stream.of(CharacteristicAccessType.values())
//                 .filter(c -> c.bitField == bitField)
//                 .findFirst().orElse(null);
//     }
// 
//     public static Set<CharacteristicAccessType> parse(int flags) {
//         return Stream.of(CharacteristicAccessType.values())
//                 .filter(c -> (c.bitField & flags) > 0)
//                 .collect(Collectors.toSet());
//     }
// 
// }
// 
// Path: src/main/java/org/sputnikdev/bluetooth/manager/transport/Notification.java
// public interface Notification <T> {
// 
//     void notify(T value);
// 
// }


// Path: src/test/java/org/sputnikdev/bluetooth/manager/util/CharacteristicEmulator.java
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.sputnikdev.bluetooth.URL;
import org.sputnikdev.bluetooth.manager.transport.Characteristic;
import org.sputnikdev.bluetooth.manager.transport.CharacteristicAccessType;
import org.sputnikdev.bluetooth.manager.transport.Notification;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

package org.sputnikdev.bluetooth.manager.util;




public class CharacteristicEmulator {

    private Characteristic characteristic;
    private ArgumentCaptor<Notification> valueNotificationCaptor = ArgumentCaptor.forClass(Notification.class);