File tree Expand file tree Collapse file tree
src/test/java/com/maxmind/minfraud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,13 +151,11 @@ public void test200WithInvalidJson() throws Exception {
151151
152152 @ Test
153153 public void testInsufficientCredit () throws Exception {
154- Exception ex = assertThrows (InsufficientFundsException .class , () -> {
155- createInsightsError (
156- 402 ,
157- "application/json" ,
158- "{\" code\" :\" INSUFFICIENT_FUNDS\" ,\" error\" :\" out of credit\" }"
159- );
160- });
154+ Exception ex = assertThrows (InsufficientFundsException .class , () -> createInsightsError (
155+ 402 ,
156+ "application/json" ,
157+ "{\" code\" :\" INSUFFICIENT_FUNDS\" ,\" error\" :\" out of credit\" }"
158+ ));
161159 assertEquals ("out of credit" , ex .getMessage ());
162160
163161 }
@@ -180,13 +178,11 @@ public void testInvalidAuth(String code) throws Exception {
180178
181179 @ Test
182180 public void testPermissionRequired () throws Exception {
183- Exception ex = assertThrows (PermissionRequiredException .class , () -> {
184- createInsightsError (
185- 403 ,
186- "application/json" ,
187- "{\" code\" :\" PERMISSION_REQUIRED\" ,\" error\" :\" Permission required\" }"
188- );
189- });
181+ Exception ex = assertThrows (PermissionRequiredException .class , () -> createInsightsError (
182+ 403 ,
183+ "application/json" ,
184+ "{\" code\" :\" PERMISSION_REQUIRED\" ,\" error\" :\" Permission required\" }"
185+ ));
190186 assertEquals ("Permission required" , ex .getMessage ());
191187 }
192188
You can’t perform that action at this time.
0 commit comments