From d4e4a3f7d31aa3903aa357e66a0b92741a97ac8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Engelmann?= Date: Thu, 22 Feb 2024 10:01:05 +0100 Subject: [PATCH] fixed warnings. --- .../sdccc/tests/util/MdibHistorianTest.java | 37 +++++-------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/sdccc/src/test/java/com/draeger/medical/sdccc/tests/util/MdibHistorianTest.java b/sdccc/src/test/java/com/draeger/medical/sdccc/tests/util/MdibHistorianTest.java index 9c1be56a..48adc983 100644 --- a/sdccc/src/test/java/com/draeger/medical/sdccc/tests/util/MdibHistorianTest.java +++ b/sdccc/src/test/java/com/draeger/medical/sdccc/tests/util/MdibHistorianTest.java @@ -919,12 +919,9 @@ void testUniqueEpisodicReportBasedHistoryFailInvalidateTestRunWhenSameReportType * Tests if applyReportOnStorage() can gracefully ignore OperationInvokedReports. * NOTE: this is a regression test: before it was fixed, applyReportOnStorage() did fail with an Exception * in this case. - * @throws ReportProcessingException - when applyReportOnStorage() throws it - * @throws PreprocessingException - when applyReportOnStorage() throws it */ @Test - void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport() - throws ReportProcessingException, PreprocessingException { + void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport() { // given final BigInteger numericMdibVersion = BigInteger.ZERO; @@ -943,12 +940,9 @@ void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport() * Tests if applyReportOnStorage() can gracefully ignore SystemErrorReports. * NOTE: this is a regression test: before it was fixed, applyReportOnStorage() did fail with an Exception * in this case. - * @throws ReportProcessingException - when applyReportOnStorage() throws it - * @throws PreprocessingException - when applyReportOnStorage() throws it */ @Test - void testApplyReportOnStorageRegressionCalledWithSystemErrorReport() - throws ReportProcessingException, PreprocessingException { + void testApplyReportOnStorageRegressionCalledWithSystemErrorReport() { // given final BigInteger numericMdibVersion = BigInteger.ZERO; @@ -970,14 +964,12 @@ void testApplyReportOnStorageRegressionCalledWithSystemErrorReport() * Tests if uniqueEpisodicReportBasedHistoryUntilTimestamp() gracefully ignores OperationInvokedReports. * NOTE: this is a regression test as uniqueEpisodicReportBasedHistoryUntilTimestamp() failed in this case * before. - * @throws ReportProcessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp() * @throws JAXBException - when thrown by the MessageStorage - * @throws PreprocessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp() * @throws IOException - when thrown by the MessageStorage */ @Test void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithOperationInvokedReport() - throws ReportProcessingException, JAXBException, PreprocessingException, IOException { + throws JAXBException, IOException { final BigInteger numericMdibVersion = BigInteger.ZERO; final String sequenceId = "abc"; @@ -1011,14 +1003,12 @@ void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithOperationIn * Tests if uniqueEpisodicReportBasedHistoryUntilTimestamp() gracefully ignores SystemErrorReports. * NOTE: this is a regression test as uniqueEpisodicReportBasedHistoryUntilTimestamp() failed in this case * before. - * @throws ReportProcessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp() * @throws JAXBException - when thrown by the MessageStorage - * @throws PreprocessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp() * @throws IOException - when thrown by the MessageStorage */ @Test void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithSystemErrorReport() - throws ReportProcessingException, JAXBException, PreprocessingException, IOException { + throws JAXBException, IOException { final String sequenceId = "abc"; @@ -1031,7 +1021,7 @@ void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithSystemError } private void testUniqueEpisodicReportBasedHistoryUntilTimestamp(final String sequenceId, final Envelope soapMessage) - throws IOException, JAXBException, ReportProcessingException, PreprocessingException { + throws IOException, JAXBException { // given final var mockObserver = mock(TestRunObserver.class); final var historianUnderTest = historianFactory.createMdibHistorian(storage, mockObserver); @@ -1062,14 +1052,11 @@ private void testUniqueEpisodicReportBasedHistoryUntilTimestamp(final String seq /** * Tests if episodicReportBasedHistory() gracefully ignores OperationInvokedReports. * NOTE: this is a regression test as episodicReportBasedHistory() failed in this case before. - * @throws ReportProcessingException - when thrown by episodicReportBasedHistory() * @throws JAXBException - when thrown by the MessageStorage - * @throws PreprocessingException - when thrown by episodicReportBasedHistory() * @throws IOException - when thrown by the MessageStorage */ @Test - void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport() - throws ReportProcessingException, JAXBException, PreprocessingException, IOException { + void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport() throws JAXBException, IOException { // given final BigInteger numericMdibVersion = BigInteger.ZERO; @@ -1102,14 +1089,11 @@ void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport() /** * Tests if episodicReportBasedHistory() gracefully ignores SystemErrorReports. * NOTE: this is a regression test as episodicReportBasedHistory() failed in this case before. - * @throws ReportProcessingException - when thrown by episodicReportBasedHistory() * @throws JAXBException - when thrown by the MessageStorage - * @throws PreprocessingException - when thrown by episodicReportBasedHistory() * @throws IOException - when thrown by the MessageStorage */ @Test - void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport() - throws ReportProcessingException, JAXBException, PreprocessingException, IOException { + void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport() throws JAXBException, IOException { // given final BigInteger numericMdibVersion = BigInteger.ZERO; @@ -1129,13 +1113,11 @@ void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport() * Tests if episodicReportBasedHistory() gracefully ignores a given report. * @param report - the report to ignore * @param sequenceId - the sequenceId of the report - * @throws ReportProcessingException - when thrown by episodicReportBasedHistory() * @throws JAXBException - when thrown by the MessageStorage - * @throws PreprocessingException - when thrown by episodicReportBasedHistory() * @throws IOException - when thrown by the MessageStorage */ void testEpisodicReportBasedHistory(final Envelope report, final String sequenceId) - throws ReportProcessingException, PreprocessingException, JAXBException, IOException { + throws JAXBException, IOException { // given final var mockObserver = mock(TestRunObserver.class); final var historianUnderTest = historianFactory.createMdibHistorian(storage, mockObserver); @@ -1186,8 +1168,7 @@ private static CodedValue createCodedValue( } private void testApplyReportOnStorage( - final BigInteger numericMdibVersion, final String sequenceId, final AbstractReport report) - throws PreprocessingException, ReportProcessingException { + final BigInteger numericMdibVersion, final String sequenceId, final AbstractReport report) { final RemoteMdibAccess mdibAccess = mock(RemoteMdibAccess.class); final MdibVersion mdibVersion = new MdibVersion(sequenceId, numericMdibVersion); final var mockObserver = mock(TestRunObserver.class);