@Test public void save3G_Profile3g() throws IOException{ OutputStream output = Mockito.mock(OutputStream.class); Profile3G profile3g = Mockito.mock(Profile3G.class); when(profile3g.getCarrier()).thenReturn("AT&T"); when(profile3g.getDevice()).thenReturn("Captivate - ad study"); when(profile3g.getProfileType()).thenReturn(ProfileType.T3G); when(profile3g.getUserInputTh()).thenReturn(1.0); when(profile3g.getPowerGpsActive()).thenReturn(1.0); when(profile3g.getPowerGpsStandby()).thenReturn(0.5); when(profile3g.getPowerCameraOn()).thenReturn(0.3); when(profile3g.getPowerBluetoothActive()).thenReturn(1.0); when(profile3g.getPowerBluetoothStandby()).thenReturn(0.5); when(profile3g.getPowerScreenOn()).thenReturn(0.3); when(profile3g.getBurstTh()).thenReturn(1.5); when(profile3g.getLongBurstTh()).thenReturn(5.0); when(profile3g.getPeriodMinCycle()).thenReturn(10.0); when(profile3g.getPeriodCycleTol()).thenReturn(1.0); when(profile3g.getLargeBurstDuration()).thenReturn(5.0); when(profile3g.getLargeBurstSize()).thenReturn(100000); when(profile3g.getCloseSpacedBurstThreshold()).thenReturn(10.0); when(profile3g.getThroughputWindow()).thenReturn(0.5); profilefactory.save3G(output, profile3g); }
@Override public void save3G(String filepath, Profile3G prof) throws IOException { OutputStream output = filemanager.getFileOutputStream(filepath); this.save3G(output, prof); }
ProfileFactoryImpl implements IProfileFactory { @Override public void save3G(String filepath, Profile3G prof) throws IOException { OutputStream output = filemanager.getFileOutputStream(filepath); this.save3G(output, prof); } }
ProfileFactoryImpl implements IProfileFactory { @Override public void save3G(String filepath, Profile3G prof) throws IOException { OutputStream output = filemanager.getFileOutputStream(filepath); this.save3G(output, prof); }  }
ProfileFactoryImpl implements IProfileFactory { @Override public void save3G(String filepath, Profile3G prof) throws IOException { OutputStream output = filemanager.getFileOutputStream(filepath); this.save3G(output, prof); }  @Override Profile create(ProfileType typeParm, Properties prop); @Override double energy3G(double time1, double time2, RRCState state, Profile3G prof); @Override Profile create3Gdefault(); @Override Profile create3GFromDefaultResourceFile(); @Override Profile create3GFromFilePath(String filepath); @Override Profile create3G(InputStream input); @Override Profile create3G(Properties properties); @Override void save3G(String filepath, Profile3G prof); @Override void save3G(OutputStream output, Profile3G prof); @Override double energyLTE(double time1, double time2, RRCState state, ProfileLTE prof, List<PacketInfo> packets); @Override Profile createLTEdefault(); @Override Profile createLTEFromDefaultResourceFile(); @Override Profile createLTEFromFilePath(String filepath); @Override Profile createLTE(InputStream input); @Override Profile createLTE(Properties properties); @Override void saveLTE(String filepath, ProfileLTE prof); @Override void saveLTE(OutputStream output, ProfileLTE prof); @Override double energyWiFi(double time1, double time2, RRCState state , ProfileWiFi prof); @Override Profile createWiFidefault(); @Override Profile createWiFiFromFilePath(String filepath); @Override Profile createWiFiFromDefaultResourceFile(); @Override Profile createWiFi(InputStream input); @Override Profile createWiFi(Properties properties); @Override void saveWiFi(String filepath, ProfileWiFi prof); @Override void saveWiFi(OutputStream output, ProfileWiFi prof); }
ProfileFactoryImpl implements IProfileFactory { @Override public void save3G(String filepath, Profile3G prof) throws IOException { OutputStream output = filemanager.getFileOutputStream(filepath); this.save3G(output, prof); }  @Override Profile create(ProfileType typeParm, Properties prop); @Override double energy3G(double time1, double time2, RRCState state, Profile3G prof); @Override Profile create3Gdefault(); @Override Profile create3GFromDefaultResourceFile(); @Override Profile create3GFromFilePath(String filepath); @Override Profile create3G(InputStream input); @Override Profile create3G(Properties properties); @Override void save3G(String filepath, Profile3G prof); @Override void save3G(OutputStream output, Profile3G prof); @Override double energyLTE(double time1, double time2, RRCState state, ProfileLTE prof, List<PacketInfo> packets); @Override Profile createLTEdefault(); @Override Profile createLTEFromDefaultResourceFile(); @Override Profile createLTEFromFilePath(String filepath); @Override Profile createLTE(InputStream input); @Override Profile createLTE(Properties properties); @Override void saveLTE(String filepath, ProfileLTE prof); @Override void saveLTE(OutputStream output, ProfileLTE prof); @Override double energyWiFi(double time1, double time2, RRCState state , ProfileWiFi prof); @Override Profile createWiFidefault(); @Override Profile createWiFiFromFilePath(String filepath); @Override Profile createWiFiFromDefaultResourceFile(); @Override Profile createWiFi(InputStream input); @Override Profile createWiFi(Properties properties); @Override void saveWiFi(String filepath, ProfileWiFi prof); @Override void saveWiFi(OutputStream output, ProfileWiFi prof);  }