aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/juick/FormatterTest.java4
-rw-r--r--src/test/java/com/juick/config/TestActivityConfiguration.java2
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/com/juick/FormatterTest.java b/src/test/java/com/juick/FormatterTest.java
index 1f805bb0..519d70a8 100644
--- a/src/test/java/com/juick/FormatterTest.java
+++ b/src/test/java/com/juick/FormatterTest.java
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.*;
public class FormatterTest {
@Test
- public void forAnyDateFormatterShouldReturnNotEmptyString() throws Exception {
+ public void forAnyDateFormatterShouldReturnNotEmptyString() {
Instant ts = Instant.now();
assertThat(DateFormattersHolder.getMessageFormatterInstance().format(ts), not(emptyOrNullString()));
@@ -49,7 +49,7 @@ public class FormatterTest {
}
@Test
- public void forConcreteDateShouldReturnCorrectString() throws Exception {
+ public void forConcreteDateShouldReturnCorrectString() {
Calendar calendar = GregorianCalendar.getInstance();
calendar.set(2012, 0, 1, 0, 0, 0);
diff --git a/src/test/java/com/juick/config/TestActivityConfiguration.java b/src/test/java/com/juick/config/TestActivityConfiguration.java
index 94b96bdf..854bad06 100644
--- a/src/test/java/com/juick/config/TestActivityConfiguration.java
+++ b/src/test/java/com/juick/config/TestActivityConfiguration.java
@@ -30,7 +30,7 @@ public class TestActivityConfiguration {
@Value("classpath:test.p12")
Resource keystoreFile;
@Bean
- public KeystoreManager testKeystoreManager() throws IOException {
+ public KeystoreManager testKeystoreManager() {
return new KeystoreManager(keystoreFile, "secret");
}
}
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 0bc23bf7..00259f8f 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -631,7 +631,7 @@ public class ServerTests {
.andExpect(status().isOk())
.andReturn();
List<TagStats> tagsFromApi = jsonMapper.readValue(result.getResponse().getContentAsString(),
- new TypeReference<List<TagStats>>() {
+ new TypeReference<>() {
});
TagStats yoStats = tagsFromApi.stream().filter(t -> t.getTag().getName().equals("yo")).findFirst().get();
assertThat(yoStats.getUsageCount(), is(2));
@@ -640,7 +640,7 @@ public class ServerTests {
.andExpect(status().isOk())
.andReturn();
List<TagStats> ugnichTagsFromApi = jsonMapper.readValue(result2.getResponse().getContentAsString(),
- new TypeReference<List<TagStats>>() {
+ new TypeReference<>() {
});
TagStats yoUgnichStats = ugnichTagsFromApi.stream().filter(t -> t.getTag().getName().equals("yo")).findFirst().get();
assertThat(yoUgnichStats.getUsageCount(), is(1));
@@ -690,7 +690,7 @@ public class ServerTests {
.andExpect(status().isOk())
.andReturn();
List<User> users = jsonMapper.readValue(result.getResponse().getContentAsString(),
- new TypeReference<List<User>>() {
+ new TypeReference<>() {
});
assertThat(users.size(), is(1));
assertThat(users.get(0).getTokens().size(), is(1));
@@ -1471,7 +1471,7 @@ public class ServerTests {
}
@Test
- public void bannedUserShouldBeShadowedFromRecommendationsList() throws IOException {
+ public void bannedUserShouldBeShadowedFromRecommendationsList() {
jdbcTemplate.execute("DELETE FROM bl_users");
User ermine = userService.createUser("ermine", "secret").orElseThrow(IllegalStateException::new);
User monstreek = userService.createUser("monstreek", "secret").orElseThrow(IllegalStateException::new);