static void askForHardStop(File tmpDir) throws IOException {
    writeToShareMemory(tmpDir, 1, (byte) 0xFF);
  }
@Test
  public void askForHardStop_write_right_bit_with_right_value_in_right_file() throws Exception {
    File tempFolder = temporaryFolder.newFolder();

    Shutdowner.askForHardStop(tempFolder);
    try (RandomAccessFile sharedMemory = new RandomAccessFile(new File(tempFolder, "sharedmemory"), "r")) {
      // Using values from org.sonar.process.ProcessCommands
      MappedByteBuffer mappedByteBuffer = sharedMemory.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, 50L * 10);

      assertThat(mappedByteBuffer.get(1)).isEqualTo((byte) 0xFF);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }