Paperwork { public String get(String key) { init(); return json.optString(key); } Paperwork(Context context);  Paperwork(Context context, String filename); String get(String key); static final String DEFAULT_FILENAME; }
@Test public void testPaperworkCustomFileName() { final Paperwork paperwork = new Paperwork(RuntimeEnvironment.application, "test.json"); assertEquals("value", paperwork.get("key")); }
@Test public void testPaperworkDefaultFileName() { final Paperwork paperwork = new Paperwork(RuntimeEnvironment.application); assertEquals("hell yeah", paperwork.get("testing rocks")); }
@Test public void testPaperworkMultipleKeys() { final Paperwork paperwork = new Paperwork(RuntimeEnvironment.application, "multiple_keys.json"); assertEquals("value 1", paperwork.get("key 1")); assertEquals("value 2", paperwork.get("key 2")); assertEquals("value 3", paperwork.get("key 3")); }