summaryrefslogtreecommitdiff
path: root/same/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/test/java')
-rw-r--r--same/src/test/java/com/orbekk/same/ClientServiceImplTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
index 39c0e7c..69e4511 100644
--- a/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
+++ b/same/src/test/java/com/orbekk/same/ClientServiceImplTest.java
@@ -24,4 +24,13 @@ public class ClientServiceImplTest {
client.notifyNetwork("MyNetwork", "MasterUrl");
verify(listener).notifyNetwork("MyNetwork", "MasterUrl");
}
+
+ @Test public void discover() {
+ client.setState(".masterUrl", "master", 1);
+ ClientServiceImpl mockClient = mock(ClientServiceImpl.class);
+ connections.clientMap.put("mockClient/ClientService.json",
+ mockClient);
+ client.discover("mockClient");
+ verify(mockClient).notifyNetwork("ClientNetwork", "master");
+ }
}