From 93bdbd7c0feef4c3ae0852c10271b21af2d75715 Mon Sep 17 00:00:00 2001 From: David Venable Date: Thu, 17 Aug 2023 10:49:09 -0500 Subject: [PATCH] Correct the test coverage for data-prepper-api. Signed-off-by: David Venable --- .../dataprepper/model/codec/OutputCodecTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/codec/OutputCodecTest.java b/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/codec/OutputCodecTest.java index 4c70ef1b18..193f0ff196 100644 --- a/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/codec/OutputCodecTest.java +++ b/data-prepper-api/src/test/java/org/opensearch/dataprepper/model/codec/OutputCodecTest.java @@ -1,8 +1,8 @@ package org.opensearch.dataprepper.model.codec; import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.invocation.InvocationOnMock; import org.opensearch.dataprepper.model.event.DefaultEventMetadata; import org.opensearch.dataprepper.model.event.Event; import org.opensearch.dataprepper.model.event.EventMetadata; @@ -19,12 +19,17 @@ import java.util.Set; import java.util.UUID; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertNotEquals; +import static org.mockito.Mockito.mock; public class OutputCodecTest { + @Test + void isCompressionInternal_returns_false() { + OutputCodec objectUnderTest = mock(OutputCodec.class, InvocationOnMock::callRealMethod); - @BeforeEach - public void setUp() { + assertThat(objectUnderTest.isCompressionInternal(), equalTo(false)); } @Test