package com.baeldung; import com.github.jsonldjava.core.JsonLdError; import com.github.jsonldjava.core.JsonLdOptions; import com.github.jsonldjava.core.JsonLdProcessor; import com.github.jsonldjava.utils.JsonUtils; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.HashMap; import java.util.Map; import static org.junit.Assert.assertNotEquals; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest public class JsonLdSerializatorTest { @Test public void whenInserting_andCount_thenWeDontGetZero() throws JsonLdError { String inputStream = "{name:}"; Object jsonObject = JsonUtils.fromInputStream(inputStream); Map context = new HashMap(); JsonLdOptions options = new JsonLdOptions(); Object compact = JsonLdProcessor.compact(jsonObject, context, options); assertNotEquals(0, 0); } }