### Program Information

Name: comments API--get comments
Domain: web service and application
Functionality: This "comments API" manages comments about music: songs, lists, artists and groups. The "get comments" service returns a collection of comments according to different criteria.
Input: id: An unique identifier for the comment. (Type: String) date: Creation date of the comment. (Type: String) text: The text of the comment. (Type: String) userName: User name of the creator.
Output: id': An unique identifier for the comment. (Type: String) date': Creation date of the comment. (Type: String) text': The text of the comment. (Type: String) userName': User name of the creator.

#### Reference

 Metamorphic Testing of RESTful Web APIs
https://dx.doi.org/10.1109/TSE.2017.2764464  

### MR Information

#### MR1------ substring

Description:
Property: Get the comments whose text contains a specific string, then get the comments whose text contains a substring of the string used in the first invocation, e.g. José. The output of the first invocation should be a subset of the output of the second invocation. For example, get the comments whose text contains "José Antonio", then get the comments whose text contains "José". The output of the first invocation should be a subset of the output of the second invocation.
Source input: a string $s$ as a search criterion
Source output: the comments $o$ whose text contains the string $s$
Follow-up input: a string $s'$ who is a substring of $s$
Follow-up output: the comments $o'$ whose text contains the string $s'$
Input relation: $s' \subseteq s$
Output relation: $o \subseteq o'$
Pattern: MROP:subset, MRP:asymmetry, MRIP:

#### MR2------

Description:
Property: Get up to a maximum number of comments n, then get up to a maximum number of comment m where m>n. The output of the first invocation should be a subset of the output of the second invocation. For example, get comments by setting the maximum number of the comments by 10. Then, get comments by setting the maximum number of the commnets by 11. The output of setting the maximum to 11 should be a subset of the output of setting the maximum to 10.
Source input: search criterion: get up to a maximum number of comments $n$
Source output: a set of comments $N$
Follow-up input: search criterion: get up to a maximum number of comment $m$
Follow-up output: a set of comments $M$
Input relation: $n < m$
Output relation: $N \subseteq M$
Pattern: MRP:asysmetry, MROP:subset, MRIP:

#### MR3------ date order

Description:
Property: Get all the comments in ascending order by date. Then get all the comments in descending order by date. The reverse of the output of the second call should be equal to the output of the first call.
Source input: search criterion: ascending order by date
Source output: get all the comments in ascending order
Follow-up input: search criterion: descending order by date
Follow-up output: get all the comments in descending order
Input relation: ascending(descending) order by date
Output relation: The reverse of the output of the second call should be equal to the output of the first call.
Pattern: MRP:symmetry, MROP:equality, MRIP:change direction

#### MR4------

Description:
Property: Get all the comments, the output of this invocation is a set of comments of size X. Get up to a maximum number of comments n, where X<=n. The outputs of both invocations should be equal. For example, the number of all the comments is 10. The first invocation is "to get all the comments". Then, the second invocation is "to get 11 comments". The output of both invocations should be the same 10 comments.
Source input: criterion: get all comments
Source output: a set of comments $M$ of size $X$
Follow-up input: criterion: get up to a maximum number of comments $n$
Follow-up output: a set of comments $N$
Input relation: $X<n$
Output relation: $M=N$
Pattern: MRP:symmetry, MROP:equality, MRIP:

#### MR5------

Description:
Property: Get all the comments, the output of this invocation is a set of comments of size X. Get up to a maximum number of comments n, where n<X, and then get the comments from n+1 to X. The union of the outputs of the second and third invocations should be equal (as a set, i.e. it should contain the same elements) to the output of the first call. For example, the first invocation is "to get all the comments", and it returns 10 comments. Then, the second invocation is "to get 5 comments", while the third invocaiton is "to get comments from 6 to 10". The union of the outputs of the second and third invocations should be equal to the first one.
Source input: search criterion: get all comments
Source output: a set of comments $M$ of size $X$
Follow-up input: search criterion: get up to a maximum number of comments $n$. search criterion: get the comments from $n+1$ to $X$.
Follow-up output: a set of comments $N$, another set of comments $O$.
Input relation: $n<X$
Output relation: $N+O=X$
Pattern: MRP:symmetry, MROP:equality, MRIP:

#### MR6------

Description:
Property: Get up to a maximum number of comments n. Get the comments from n+1 to m, where m>n. The outputs of both invocations should be disjoint.
Source input: get up to a maximum number of comments $n$
Source output: a set of comments $M$
Follow-up input: get the comments from $n+1$ to $m$
Follow-up output: a set of comments $N$
Input relation: $m>n$
Output relation: the outputs of both invocations should be disjoint.
Pattern: MRP:asymmetry, MROP:disjoint
Insert title here