Return an empty profile from a mocked Sone.
[Sone.git] / src / test / java / net / pterodactylus / sone / data / Mocks.java
index fd95180..e1b9102 100644 (file)
@@ -77,8 +77,9 @@ public class Mocks {
                Sone sone = mock(Sone.class);
                when(sone.getId()).thenReturn(id);
                when(sone.isLocal()).thenReturn(false);
+               when(sone.getProfile()).thenReturn(new Profile(sone));
                final Database database = core.getDatabase();
-               when(sone.newPostBuilder()).thenReturn(new DefaultPostBuilder(database, id));
+               when(sone.newPostBuilder()).thenThrow(IllegalStateException.class);
                when(sone.newPostReplyBuilder(Matchers.<String>anyObject())).thenThrow(IllegalStateException.class);
                when(core.getSone(eq(id))).thenReturn(of(sone));
                when(database.getSone(eq(id))).thenReturn(of(sone));