public void writeHotspots(List<SampledMethod> hotspots) throws IOException {
		try {
			document.open();
			addParagraph(getString("hotspots"), "clock.png");
			new PdfHotspotsReport(hotspots, document).toPdf();
		} catch (final DocumentException e) {
			throw createIOException(e);
		}
		document.close();
	}
@Test
	public void testWriteHotspots() throws IOException {
		final ByteArrayOutputStream output = new ByteArrayOutputStream();
		final SamplingProfiler samplingProfiler = new SamplingProfiler(new ArrayList<>(), null);
		final List<SampledMethod> emptyHotspots = samplingProfiler.getHotspots(100);
		samplingProfiler.update();
		final List<SampledMethod> hotspots = samplingProfiler.getHotspots(100);

		PdfOtherReport pdfOtherReport = new PdfOtherReport(TEST_APP, output);
		pdfOtherReport.writeHotspots(emptyHotspots);
		assertNotEmptyAndClear(output);
		pdfOtherReport = new PdfOtherReport(TEST_APP, output);
		pdfOtherReport.writeHotspots(hotspots);
		assertNotEmptyAndClear(output);
	}