-
- public void testListPeers() throws FcpException, IOException {
- List<Map<String, String>> peers = fcpConnection.sendListPeers(true, true);
- for (Map<String, String> peer: peers) {
- for (Map.Entry<String, String> entry: peer.entrySet()) {
- System.out.println(entry.getKey() + ": " + entry.getValue());
+
+// public void testListPeers() throws FcpException, IOException {
+// List<Map<String, String>> peers = fcpConnection.sendListPeers(true, true);
+// for (Map<String, String> peer: peers) {
+// for (Map.Entry<String, String> entry: peer.entrySet()) {
+// System.out.println(entry.getKey() + ": " + entry.getValue());
+// }
+// }
+// }
+
+// public void testListPeerNotes() throws FcpException, IOException {
+// List<Map<String, String>> peers = fcpConnection.sendListPeerNotes("AY6rGAGjayoyQD2CkvQibf1Ct3mh6iwqyntzNpfRsiM");
+// for (Map<String, String> peer: peers) {
+// for (Map.Entry<String, String> entry: peer.entrySet()) {
+// System.out.println(entry.getKey() + ": " + entry.getValue());
+// }
+// }
+// }
+
+ /**
+ * Generates an SSK key pair.
+ *
+ * @throws FcpException
+ * if an FCP error occurs
+ * @throws IOException
+ * if an I/O error occurs
+ * @throws InterruptedException
+ * if {@link Object#wait()} wakes up spuriously
+ */
+ public void testGenerateSSK() throws IOException, FcpException, InterruptedException {
+ final boolean[] result = new boolean[1];
+ FcpAdapter fcpAdapter = new FcpAdapter() {
+ /**
+ * @see net.pterodactylus.util.fcp.FcpAdapter#receivedNodeHello(net.pterodactylus.util.fcp.FcpConnection,
+ * net.pterodactylus.util.fcp.message.NodeHello)
+ */
+ @Override
+ public void receivedNodeHello(FcpConnection fcpConnection, NodeHello nodeHello) {
+ result[0] = true;
+ synchronized (this) {
+ notify();
+ }