JsDatastoreParserObject { @NonNull public JSONArray getInteractions() throws JSONException { String interactionsArray = mJsDatastore.attr("data-interactions"); if (!interactionsArray.equals("[]")) { return new JSONArray(interactionsArray); } return new JSONArray(); } JsDatastoreParserObject(Document doc); String getUsername(); int getFilterId(); List<Integer> getHiddenTagIds(); List<Integer> getSpoileredTagIds(); @NonNull JSONArray getInteractions();  }
@Test public void testInteractions() throws JSONException { EnumSet expected = EnumSet.of(DerpibooruImageInteraction.InteractionType.Fave, DerpibooruImageInteraction.InteractionType.Upvote); ImageInteractionsParserObject interactionsHelper = new ImageInteractionsParserObject( loggedIn.getInteractions().toString()); assertThat(interactionsHelper.getImageInteractionsForImage(10005), is(expected)); assertNotNull(loggedOut.getInteractions()); }