@Test public void create_LTEIsIdle() { ProfileLTE profile02 = mock(ProfileLTE.class); when(profile02.getProfileType()).thenReturn(ProfileType.LTE); List<PacketInfo> packetlist1 = new ArrayList<PacketInfo>(); double traceDuration = 2000.0; List<RrcStateRange> testResult = rrcStateRangeFactory.create(packetlist1, profile02, traceDuration); assertEquals(1, testResult.size()); }
@Override public List<RrcStateRange> create(List<PacketInfo> packetlist, Profile profile, double traceDuration) { if(profile.getProfileType() == ProfileType.T3G){ Profile3G prof = (Profile3G)profile; return this.create3G(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.WIFI){ ProfileWiFi prof = (ProfileWiFi)profile; return this.createWiFi(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.LTE){ ProfileLTE prof = (ProfileLTE)profile; return this.createLTE(packetlist, prof, traceDuration); }else{ throw new IllegalArgumentException("Invalid profile type for state machine: " + profile.getClass()); } }
RrcStateRangeFactoryImpl implements IRrcStateRangeFactory { @Override public List<RrcStateRange> create(List<PacketInfo> packetlist, Profile profile, double traceDuration) { if(profile.getProfileType() == ProfileType.T3G){ Profile3G prof = (Profile3G)profile; return this.create3G(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.WIFI){ ProfileWiFi prof = (ProfileWiFi)profile; return this.createWiFi(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.LTE){ ProfileLTE prof = (ProfileLTE)profile; return this.createLTE(packetlist, prof, traceDuration); }else{ throw new IllegalArgumentException("Invalid profile type for state machine: " + profile.getClass()); } } }
RrcStateRangeFactoryImpl implements IRrcStateRangeFactory { @Override public List<RrcStateRange> create(List<PacketInfo> packetlist, Profile profile, double traceDuration) { if(profile.getProfileType() == ProfileType.T3G){ Profile3G prof = (Profile3G)profile; return this.create3G(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.WIFI){ ProfileWiFi prof = (ProfileWiFi)profile; return this.createWiFi(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.LTE){ ProfileLTE prof = (ProfileLTE)profile; return this.createLTE(packetlist, prof, traceDuration); }else{ throw new IllegalArgumentException("Invalid profile type for state machine: " + profile.getClass()); } }  }
RrcStateRangeFactoryImpl implements IRrcStateRangeFactory { @Override public List<RrcStateRange> create(List<PacketInfo> packetlist, Profile profile, double traceDuration) { if(profile.getProfileType() == ProfileType.T3G){ Profile3G prof = (Profile3G)profile; return this.create3G(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.WIFI){ ProfileWiFi prof = (ProfileWiFi)profile; return this.createWiFi(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.LTE){ ProfileLTE prof = (ProfileLTE)profile; return this.createLTE(packetlist, prof, traceDuration); }else{ throw new IllegalArgumentException("Invalid profile type for state machine: " + profile.getClass()); } }  @Override List<RrcStateRange> create(List<PacketInfo> packetlist,
			Profile profile, double traceDuration); }
RrcStateRangeFactoryImpl implements IRrcStateRangeFactory { @Override public List<RrcStateRange> create(List<PacketInfo> packetlist, Profile profile, double traceDuration) { if(profile.getProfileType() == ProfileType.T3G){ Profile3G prof = (Profile3G)profile; return this.create3G(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.WIFI){ ProfileWiFi prof = (ProfileWiFi)profile; return this.createWiFi(packetlist, prof, traceDuration); }else if(profile.getProfileType() == ProfileType.LTE){ ProfileLTE prof = (ProfileLTE)profile; return this.createLTE(packetlist, prof, traceDuration); }else{ throw new IllegalArgumentException("Invalid profile type for state machine: " + profile.getClass()); } }  @Override List<RrcStateRange> create(List<PacketInfo> packetlist,
			Profile profile, double traceDuration);  }