package Ġcom . sys 1 y agi . mast od on 4 j . api . method Ċ Ċ import Ġcom . sys 1 y agi . mast od on 4 j . api . exception . M ast od on 4 j RequestException Ċ import Ġcom . sys 1 y agi . mast od on 4 j . test tool . Mock Client Ċ import Ġorg . am sh ove . k lu ent . should EqualTo Ċ import Ġorg . junit . Test Ċ Ċ class ĠReports Test Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġget Reports () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġclient Ġ= ĠMock Client . mock (" reports . json ") ĊĠĠĠĠĠĠĠ Ġval Ġreports Ġ= ĠReports ( client ) ĊĠĠĠĠĠĠĠ Ġval Ġpage able Ġ= Ġreports . get Reports (). execute () ĊĠĠĠĠĠĠĠ Ġval Ġreport Ġ= Ġpage able . part . first () ĊĠĠĠĠĠĠĠ Ġreport . id Ġshould EqualTo Ġ 1 0 0 L ĊĠĠĠĠĠĠĠ Ġreport . action Taken Ġshould EqualTo Ġ" test " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠM ast od on 4 j RequestException :: class ) ĊĠĠĠ Ġfun Ġget Report sWith Exception () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġclient Ġ= ĠMock Client . io Exception () ĊĠĠĠĠĠĠĠ Ġval Ġreports Ġ= ĠReports ( client ) ĊĠĠĠĠĠĠĠ Ġreports . get Reports (). execute () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠM ast od on 4 j RequestException :: class ) ĊĠĠĠ Ġfun Ġpost Report With Exception () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġclient Ġ= ĠMock Client . io Exception () ĊĠĠĠĠĠĠĠ Ġval Ġreports Ġ= ĠReports ( client ) ĊĠĠĠĠĠĠĠ Ġreports . post Report ( 1 0 , Ġ 2 0 , Ġ" test "). execute () ĊĠĠĠ Ġ} Ċ } Ċ