@Override
  public JreInfoRestResponse getJreMetadata(String id) {
    return jresHandler.getJreMetadata(id);
  }
@Test
  void getJre_shouldDownloadJre_whenHeaderIsOctetStream() throws Exception {
    String anyId = "anyId";
    String anyFilename = "anyFilename";
    JreInfoRestResponse jreInfoRestResponse = new JreInfoRestResponse(anyId, anyFilename, "sha256", "javaPath", "os", "arch");
    when(jresHandler.getJreMetadata(anyId)).thenReturn(jreInfoRestResponse);
    byte[] anyBinary = {1, 2, 3};

    when(jresHandler.getJreBinary(anyFilename)).thenReturn(new ByteArrayInputStream(anyBinary));

    mockMvc.perform(get(JRE_ENDPOINT + "/" + anyId)
        .header("Accept", APPLICATION_OCTET_STREAM_VALUE))
      .andExpect(status().isOk())
      .andExpect(content().contentType(APPLICATION_OCTET_STREAM))
      .andExpect(content().bytes(anyBinary));
  }