StandardMessenger implements Messenger { public boolean isReservedChannel(String channel) { validateChannel(channel); return channel.equals("REGISTER") || channel.equals("UNREGISTER"); }  boolean isReservedChannel(String channel); void registerOutgoingPluginChannel(Plugin plugin, String channel); void unregisterOutgoingPluginChannel(Plugin plugin, String channel); void unregisterOutgoingPluginChannel(Plugin plugin); PluginMessageListenerRegistration registerIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); void unregisterIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); void unregisterIncomingPluginChannel(Plugin plugin, String channel); void unregisterIncomingPluginChannel(Plugin plugin); Set<String> getOutgoingChannels(); Set<String> getOutgoingChannels(Plugin plugin); Set<String> getIncomingChannels(); Set<String> getIncomingChannels(Plugin plugin); Set<PluginMessageListenerRegistration> getIncomingChannelRegistrations(Plugin plugin); Set<PluginMessageListenerRegistration> getIncomingChannelRegistrations(String channel); Set<PluginMessageListenerRegistration> getIncomingChannelRegistrations(Plugin plugin, String channel); boolean isRegistrationValid(PluginMessageListenerRegistration registration); boolean isIncomingChannelRegistered(Plugin plugin, String channel); boolean isOutgoingChannelRegistered(Plugin plugin, String channel); void dispatchIncomingMessage(Player source, String channel, byte[] message); static void validateChannel(String channel); static void validatePluginMessage(Messenger messenger, Plugin source, String channel, byte[] message);  }
@Test public void testIsReservedChannel() { Messenger messenger = getMessenger(); assertTrue(messenger.isReservedChannel("REGISTER")); assertFalse(messenger.isReservedChannel("register")); assertTrue(messenger.isReservedChannel("UNREGISTER")); assertFalse(messenger.isReservedChannel("unregister")); assertFalse(messenger.isReservedChannel("notReserved")); }