Under what conditions should I test the get () and set () methods?


I could not confirm whether to do these tests. It seems the set and get method is so simple,such as:

setA(String A) {
    this.A = A;

    return A;

Any ideas would be appreciated!

Thanks, Joseph

General rule: Not much point in writing tests for getters and setters. Only if they have some additional logic, ie. are not pure accessors, you should write the tests.