blueReader { public static boolean isblueReader() { final ActiveBluetoothDevice activeBluetoothDevice = ActiveBluetoothDevice.first(); try { return activeBluetoothDevice.name.contentEquals("blueReader"); } catch (NullPointerException e) { return false; } }  static boolean isblueReader(); static byte[] decodeblueReaderPacket(byte[] buffer, int len); static ByteBuffer initialize();  }
@Test public void isBlueReader_True() { ActiveBluetoothDevice mock = new ActiveBluetoothDevice(); mock.name = "blueReader"; mock.save(); boolean isBlueReader = blueReader.isblueReader(); assertThat(isBlueReader).isTrue(); }
@Test public void isBlueReader_False() { ActiveBluetoothDevice mock = new ActiveBluetoothDevice(); mock.name = "someOtherDevice"; mock.save(); boolean isBlueReader = blueReader.isblueReader(); assertThat(isBlueReader).isFalse(); }
@Test public void isBlueReader_NoDevice() { boolean isBlueReader = blueReader.isblueReader(); assertThat(isBlueReader).isFalse(); }