@Test
public void decodeBlueReaderPacket_notReadyFor_threeTime() {

    // :: Setup
    byte[] buffer = "not ready for".getBytes();
    Pref.setBoolean("blueReader_suppressuglystatemsg", true);  // set to prevent notification as Context is not established
    // :: Act
    byte[] reply1 = blueReader.decodeblueReaderPacket(buffer, -1);
    byte[] reply2 = blueReader.decodeblueReaderPacket(buffer, -1);
    byte[] reply3 = blueReader.decodeblueReaderPacket(buffer, -1);
    // :: Verify
    assertThat(reply1).isNotNull();
    assertThat(reply2).isNotNull();
    assertThat(reply3).isNotNull();
    assertThat(new String(reply1)).isEqualTo("h");
    assertThat(new String(reply2)).isEqualTo("h");
    assertThat(new String(reply3)).isEqualTo("k");
    String log = getLogs();
    assertThat(log).contains("E/blueReader: Found blueReader in a ugly State (1/3), send hibernate to reset! If this does not help in the next 5 Minutes, then turn the bluereader manually off and on!");
    assertThat(log).contains("E/blueReader: Found blueReader in a ugly State (2/3), send hibernate to reset! If this does not help in the next 5 Minutes, then turn the bluereader manually off and on!");
    assertThat(log).contains("E/blueReader: Found blueReader in a ugly State (3/3), send hibernate to reset! If this does not help in the next 5 Minutes, then turn the bluereader manually off and on!");
    assertThat(log).contains("A/blueReader: Ugly state not resolveable. Bluereader will be shut down! Please restart it!");
}