### Question:
Payload implements Serializable { public String getStatementsAsJson() { return new Gson().toJson(payloadLst); }  void addStatement(String logical, String attribute, String operand, String value); void addStatement(String attribute, String value); void addStatement(String attribute, int value); void enqueueStatement(Statement s); int size(); @Override boolean equals(Object obj); @Override int hashCode(); List<Statement> getStatements(String attribute); List<Statement> getStatements(); String getStatementsAsJson(); String getStatementValue(String attribute); Iterator<Statement> iterator(); void merge(Payload anotherPayload); @Override String toString(); void clear();  }### Answer:
@Test public void testGetStatementsAsJson() { LOG.info("Produce a list of statements in JSON format"); Payload payload = new Payload(); payload.addStatement("no", "value1"); payload.addStatement("yes", "value2"); payload.addStatement("yes", "value3"); String value = "[{\"logical\":\"AND\",\"attribute\":\"no\",\"operand\":\"EQUALS\",\"value\":\"value1\"},{\"logical\":\"AND\",\"attribute\":\"yes\",\"operand\":\"EQUALS\",\"value\":\"value2\"},{\"logical\":\"AND\",\"attribute\":\"yes\",\"operand\":\"EQUALS\",\"value\":\"value3\"}]"; assertEquals(value, payload.getStatementsAsJson()); }