1 4 package com.tc.net.protocol.tcm; 5 6 import com.tc.exception.ImplementMe; 7 import com.tc.object.session.SessionID; 8 9 import junit.framework.TestCase; 10 11 public class MessageMonitorImplTest extends TestCase { 12 13 public void tests() throws Exception { 14 MessageMonitorImpl mm = new MessageMonitorImpl(); 15 mm.newIncomingMessage(new TestTCMessage()); 16 mm.newOutgoingMessage(new TestTCMessage()); 17 System.out.println(mm); 18 } 19 20 21 private static class TestTCMessage implements TCMessage { 22 23 public int getCorrelationId(boolean initialize) { 24 return 0; 25 } 26 27 public void setCorrelationId(int id) { 28 return; 29 } 30 31 public TCMessageType getMessageType() { 32 return TCMessageType.ACKNOWLEDGE_TRANSACTION_MESSAGE; 33 } 34 35 public void hydrate() { 36 return; 37 } 38 39 public void dehydrate() { 40 return; 41 } 42 43 public void send() { 44 return; 45 } 46 47 public MessageChannel getChannel() { 48 return null; 49 } 50 51 public int getTotalLength() { 52 return 100; 53 } 54 55 public ChannelID getChannelID() { 56 return null; 57 } 58 59 public boolean resend() { 60 throw new ImplementMe(); 61 62 } 63 64 public SessionID getLocalSessionID() { 65 throw new ImplementMe(); 66 } 67 68 } 69 } 70 | Popular Tags |