Skip to content

Commit 80fc8aa

Browse files
committed
Minor code cleanup
1 parent 0a43531 commit 80fc8aa

1 file changed

Lines changed: 10 additions & 14 deletions

File tree

src/test/java/com/maxmind/minfraud/WebServiceClientTest.java

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)