@Override
  public void write(String key, InputStream data) {
    checkNotNull(data);
    try {
      write(key, data.readAllBytes());
    } catch (IOException e) {
      throw new IllegalStateException("Failed to read sensor write cache data", e);
    }
  }
@Test
  public void dont_write_if_its_pull_request()  {
    byte[] b1 = new byte[] {1, 2, 3};
    when(branchConfiguration.isPullRequest()).thenReturn(true);
    writeCache.write("key1", b1);
    writeCache.write("key2", new ByteArrayInputStream(b1));
    assertThatCacheContains(Map.of());
  }