1 package net.pterodactylus.fcp;
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.hamcrest.Matchers.is;
9 * Unit test for {@link ModifyPeerNote}.
11 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
13 public class ModifyPeerNoteTest {
15 private static final String IDENTIFIER = "identifier";
16 private static final String NODE_IDENTIFIER = "node_identifier";
17 private static final String ENCODED_NOTE_TEXT = "VWJlck5vZGUgKHVudGlsIEkgaGF2ZSByZWFsIHBlZXJzKQ==";
18 private static final String DECODED_NOTE_TEXT = "UberNode (until I have real peers)";
21 public void noteTextIsEncodedCorrectly() {
22 ModifyPeerNote modifyPeerNote = new ModifyPeerNote(IDENTIFIER, NODE_IDENTIFIER);
23 modifyPeerNote.setNoteText(DECODED_NOTE_TEXT);
24 assertThat(modifyPeerNote.getField("NoteText"), is(ENCODED_NOTE_TEXT));