@@ -17,14 +17,14 @@ public class ContextFramingTest {
1717 @ Test
1818 public void testFraming () throws Exception {
1919
20- final Map <String , Object > contextAbbrevs = new HashMap <String , Object >();
20+ final Map <String , Object > contextAbbrevs = new HashMap <>();
2121 contextAbbrevs .put ("so" , "http://schema.org/" );
2222
23- final Map <String , Object > json = new HashMap <String , Object >();
23+ final Map <String , Object > json = new HashMap <>();
2424 json .put ("@context" , contextAbbrevs );
2525 json .put ("@id" , "http://example.org/my_work" );
2626
27- final List <Object > types = new LinkedList <Object >();
27+ final List <Object > types = new LinkedList <>();
2828 types .add ("so:CreativeWork" );
2929
3030 json .put ("@type" , types );
@@ -36,20 +36,20 @@ public void testFraming() throws Exception {
3636 options .setCompactArrays (true );
3737 options .setOmitGraph (true );
3838
39- // System.out.println("Before compact ");
39+ // System.out.println("Before framing ");
4040 // System.out.println(JsonUtils.toPrettyString(json));
4141
4242 final String frameStr = "{\" @id\" : \" http://schema.org/myid\" , \" @context\" : \" http://schema.org/\" }" ;
4343 final Object frame = JsonUtils .fromString (frameStr );
4444
45- final Map <String , Object > compacted = JsonLdProcessor .frame (json , frame , options );
45+ final Map <String , Object > framed = JsonLdProcessor .frame (json , frame , options );
4646
47- // System.out.println("\n\nAfter compact :");
48- // System.out.println(JsonUtils.toPrettyString(compacted ));
47+ // System.out.println("\n\nAfter framing :");
48+ // System.out.println(JsonUtils.toPrettyString(framed ));
4949
50- assertTrue ("Framing removed the context" , compacted .containsKey ("@context" ));
50+ assertTrue ("Framing removed the context" , framed .containsKey ("@context" ));
5151 assertFalse ("Framing of context should be a string, not a list" ,
52- compacted .get ("@context" ) instanceof List );
52+ framed .get ("@context" ) instanceof List );
5353 }
5454
5555 @ Test
@@ -63,15 +63,15 @@ public void testFramingRemoteContext() throws Exception {
6363 final JsonLdOptions options = new JsonLdOptions ();
6464 options .setOmitGraph (true );
6565
66- final Map <String , Object > compacted = JsonLdProcessor .frame (json , frame , options );
66+ final Map <String , Object > framed = JsonLdProcessor .frame (json , frame , options );
6767
68- // System.out.println("\n\nAfter compact :");
69- // System.out.println(JsonUtils.toPrettyString(compacted ));
68+ // System.out.println("\n\nAfter framing :");
69+ // System.out.println(JsonUtils.toPrettyString(framed ));
7070
71- assertEquals ("Wrong framing context" , "http://schema.org/" , compacted .get ("@context" ));
72- assertEquals ("Wrong framing id" , "schema:myid" , compacted .get ("id" ));
73- assertEquals ("Wrong framing type" , "Person" , compacted .get ("type" ));
74- assertEquals ("Wrong number of Json entries" ,3 , compacted .size ());
71+ assertEquals ("Wrong framing context" , "http://schema.org/" , framed .get ("@context" ));
72+ assertEquals ("Wrong framing id" , "schema:myid" , framed .get ("id" ));
73+ assertEquals ("Wrong framing type" , "Person" , framed .get ("type" ));
74+ assertEquals ("Wrong number of Json entries" ,3 , framed .size ());
7575 }
7676
7777}
0 commit comments