import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
private void setupEmptyProfile() {
when(configuration.getStringValue(anyString())).thenReturn(
- new TestValue<String>(null));
+ TestValue.<String>from(null));
when(configuration.getIntValue(anyString())).thenReturn(
- new TestValue<Integer>(null));
+ TestValue.<Integer>from(null));
}
@Test
private void setupString(String nodeName, String value) {
when(configuration.getStringValue(eq(nodeName))).thenReturn(
- new TestValue<String>(value));
+ TestValue.from(value));
}
private void setupInteger(String nodeName, Integer value) {
when(configuration.getIntValue(eq(nodeName))).thenReturn(
- new TestValue<Integer>(value));
+ TestValue.from(value));
}
@Test
private void setupLong(String nodeName, Long value) {
when(configuration.getLongValue(eq(nodeName))).thenReturn(
- new TestValue<Long>(value));
+ TestValue.from(value));
}
@Test(expected = InvalidPostFound.class)
albumBuilderFactory);
assertThat(topLevelAlbums, hasSize(2));
Album firstAlbum = topLevelAlbums.get(0);
- assertThat(firstAlbum, isAlbum("A1", null, "T1", "D1", "I1"));
+ assertThat(firstAlbum, isAlbum("A1", null, "T1", "D1"));
assertThat(firstAlbum.getAlbums(), emptyIterable());
assertThat(firstAlbum.getImages(), emptyIterable());
Album secondAlbum = topLevelAlbums.get(1);
- assertThat(secondAlbum, isAlbum("A2", null, "T2", "D2", null));
+ assertThat(secondAlbum, isAlbum("A2", null, "T2", "D2"));
assertThat(secondAlbum.getAlbums(), hasSize(1));
assertThat(secondAlbum.getImages(), emptyIterable());
Album thirdAlbum = secondAlbum.getAlbums().get(0);
- assertThat(thirdAlbum, isAlbum("A3", "A2", "T3", "D3", "I3"));
+ assertThat(thirdAlbum, isAlbum("A3", "A2", "T3", "D3"));
assertThat(thirdAlbum.getAlbums(), emptyIterable());
assertThat(thirdAlbum.getImages(), emptyIterable());
}