hexsha
stringlengths
40
40
size
int64
8
1.04M
content
stringlengths
8
1.04M
avg_line_length
float64
2.24
100
max_line_length
int64
4
1k
alphanum_fraction
float64
0.25
0.97
a628dd9f5c3ce617ee04ad0eca49c9e52d5f0598
10,331
package zj.neverland.publicsdk.utils; import android.text.format.Time; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; /** * Created by sjzhand on 2017/5/11. */ public class DateUtils2 { private SimpleDateFormat sf = null; public static String getDateSx(){ Calendar cal = Calendar.getInstance(); int hour = cal.get(Calendar.HOUR_OF_DAY); if (hour < 6) { return "凌晨好!"; }else if (hour < 9){ return "早上好!"; }else if (hour < 12){ return "上午好!"; }else if (hour < 14){ return "中午好!"; }else if (hour < 17){ return "下午好!"; }else if (hour < 19){ return "傍晚好!"; }else if (hour < 22){ return "晚上好!"; }else { return "夜里好!"; } } /** * 获取当前时间 * * @return */ public String getNowTime() { String timeString = null; Time time = new Time(); time.setToNow(); String year = thanTen(time.year); String month = thanTen(time.month + 1); String monthDay = thanTen(time.monthDay); String hour = thanTen(time.hour); String minute = thanTen(time.minute); timeString = year + "-" + month + "-" + monthDay + " " + hour + ":" + minute; // System.out.println("-------timeString----------" + timeString); return timeString; } public int calculate(int year, int month) { boolean yearleap = judge(year); int day; if (yearleap && month == 2) { day = 29; } else if (!yearleap && month == 2) { day = 28; } else if (month == 4 || month == 6 || month == 9 || month == 11) { day = 30; } else { day = 31; } return day; } public boolean judge(int year) { boolean yearleap = (year % 400 == 0) || (year % 4 == 0) && (year % 100 != 0);// 采用布尔数据计算判断是否能整除 return yearleap; } /** * 十一下加零 * * @param str * @return */ public String thanTen(int str) { String string = null; if (str < 10) { string = "0" + str; } else { string = "" + str; } return string; } /** * 计算时间差 * * @param starTime * 开始时间 * @param endTime * 结束时间 * 返回类型 ==1----天,时,分。 ==2----时 * @return 返回时间差 */ public String getTimeDifference(String starTime, String endTime) { String timeString = ""; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); try { Date parse = dateFormat.parse(starTime); Date parse1 = dateFormat.parse(endTime); long diff = parse1.getTime() - parse.getTime(); long day = diff / (24 * 60 * 60 * 1000); long hour = (diff / (60 * 60 * 1000) - day * 24); long min = ((diff / (60 * 1000)) - day * 24 * 60 - hour * 60); long s = (diff / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60); long ms = (diff - day * 24 * 60 * 60 * 1000 - hour * 60 * 60 * 1000 - min * 60 * 1000 - s * 1000); // System.out.println(day + "天" + hour + "小时" + min + "分" + s + // "秒"); long hour1 = diff / (60 * 60 * 1000); String hourString = hour1 + ""; long min1 = ((diff / (60 * 1000)) - hour1 * 60); timeString = hour1 + "小时" + min1 + "分"; // System.out.println(day + "天" + hour + "小时" + min + "分" + s + // "秒"); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return timeString; } /** * 计算相差的小时 * * @param starTime * @param endTime * @return */ public String getTimeDifferenceHour(String starTime, String endTime) { String timeString = ""; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); try { Date parse = dateFormat.parse(starTime); Date parse1 = dateFormat.parse(endTime); long diff = parse1.getTime() - parse.getTime(); String string = Long.toString(diff); float parseFloat = Float.parseFloat(string); float hour1 = parseFloat / (60 * 60 * 1000); timeString = Float.toString(hour1); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return timeString; } /** * 获取时间中的某一个时间点 * * @param str * @param type * @return */ public String getJsonParseShiJian(String str, int type) { String shijanString = null; String nian = str.substring(0, str.indexOf("-")); String yue = str.substring(str.indexOf("-") + 1, str.lastIndexOf("-")); String tian = str.substring(str.lastIndexOf("-") + 1, str.indexOf(" ")); String shi = str.substring(str.indexOf(" ") + 1, str.lastIndexOf(":")); String fen = str.substring(str.lastIndexOf(":") + 1, str.length()); switch (type) { case 1: shijanString = nian; break; case 2: shijanString = yue; break; case 3: shijanString = tian; break; case 4: shijanString = shi; break; case 5: shijanString = fen; break; } return shijanString; } /** * Sring变int * * @param str * @return */ public int strToInt(String str) { int value = 0; value = Integer.parseInt(str); return value; } /** * 与当前时间比较早晚 * * @param time * 需要比较的时间 * @return 输入的时间比现在时间晚则返回true */ public boolean compareNowTime(String time) { boolean isDayu = false; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); try { Date parse = dateFormat.parse(time); Date parse1 = dateFormat.parse(getNowTime()); long diff = parse1.getTime() - parse.getTime(); if (diff <= 0) { isDayu = true; } else { isDayu = false; } } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return isDayu; } /** * 把时间戳变yyyy-MM-dd HH:mm格式时间 * * @param time * @return */ public String getDateToString(long time) { Date d = new Date(time); sf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); return sf.format(d); } /** * 返回时间戳 * * @param time * @return */ public static long dataOne(String time) { SimpleDateFormat sdr = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.CHINA); Date date; long l = 0; try { date = sdr.parse(time); l = date.getTime(); } catch (ParseException e) { e.printStackTrace(); } return l; } public static long dataOne2(String time) { SimpleDateFormat sdr = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", Locale.CHINA); Date date; long l = 0; try { date = sdr.parse(time); l = date.getTime(); } catch (ParseException e) { e.printStackTrace(); } return l/1000; } /** * 时间是否大于等于结束时间 * @param date1 * @param date2 * @return */ public static boolean dateContrast(String date1,String date2){ return dataOne(date1+" 00:00") >= dataOne(date2+" 00:00"); } /** * 比较两个时间 * * @param starTime * 开始时间 * @param endString * 结束时间 * @return 结束时间大于开始时间返回true,否则反之֮ */ public boolean compareTwoTime(String starTime, String endString) { boolean isDayu = false; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); try { Date parse = dateFormat.parse(starTime); Date parse1 = dateFormat.parse(endString); long diff = parse1.getTime() - parse.getTime(); if (diff >= 0) { isDayu = true; } else { isDayu = false; } } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return isDayu; } public boolean compareTwoTime2(String starTime, String endString) { boolean isDayu = false; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); try { Date parse = dateFormat.parse(starTime); Date parse1 = dateFormat.parse(endString); long diff = parse1.getTime() - parse.getTime(); if (diff >= 0) { isDayu = true; } else { isDayu = false; } } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return isDayu; } /** * 获取年 * * @param time * @return */ public String getTimeYear(String time) { String substring = time.substring(0, time.lastIndexOf(" ")); return substring; } /** * 换算小时,0.5小时-->0小时30分 * * @param hour * @return */ private String convertTime(String hour) { String substring = hour.substring(0, hour.lastIndexOf(".")); String substring2 = hour.substring(hour.lastIndexOf(".") + 1, hour.length()); substring2 = "0." + substring2; float f2 = Float.parseFloat(substring2); f2 = f2 * 60; String string = Float.toString(f2); String min = string.substring(0, string.lastIndexOf(".")); return substring + "小时" + min + "分"; } }
26.15443
91
0.490369
9c403c32b3060b977f61b517ee082cf736899e98
602,961
package org.im97mori.ble.characteristic.u2a66; import android.bluetooth.BluetoothGattCharacteristic; import android.os.Build; import android.os.Parcel; import org.im97mori.ble.BLEUtils; import org.im97mori.ble.characteristic.core.DateTimeUtils; import org.im97mori.ble.characteristic.core.SensorLocationUtils; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; import java.util.Arrays; import static org.im97mori.ble.BLEUtils.BASE_UUID; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @SuppressWarnings({"unused", "ConstantConditions"}) @RunWith(RobolectricTestRunner.class) @Config(instrumentedPackages = { // required to access final members on androidx.loader.content.ModernAsyncTask "androidx.loader.content"} , sdk = Build.VERSION_CODES.JELLY_BEAN_MR2) public class CyclingPowerControlPointAndroidTest { //@formatter:off private static final byte[] data_00001; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_SET_CUMULATIVE_VALUE; data[ 1] = 0x01; data[ 2] = 0x02; data[ 3] = 0x03; data[ 4] = 0x04; data_00001 = data; } private static final byte[] data_00101; static { byte[] data = new byte[2]; data[ 0] = CyclingPowerControlPoint.OP_CODES_UPDATE_SENSOR_LOCATION; data[ 1] = 0x01; data_00101 = data; } private static final byte[] data_00201; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data_00201 = data; } private static final byte[] data_00301; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_SET_CRANK_LENGTH; data[ 1] = 0x01; data[ 2] = 0x02; data_00301 = data; } private static final byte[] data_00401; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_CRANK_LENGTH; data_00401 = data; } private static final byte[] data_00501; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_LENGTH; data[ 1] = 0x01; data[ 2] = 0x02; data_00501 = data; } private static final byte[] data_00601; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_LENGTH; data_00601 = data; } private static final byte[] data_00701; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_WEIGHT; data[ 1] = 0x01; data[ 2] = 0x02; data_00701 = data; } private static final byte[] data_00801; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_WEIGHT; data_00801 = data; } private static final byte[] data_00901; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_SET_SPAN_LENGTH; data[ 1] = 0x01; data[ 2] = 0x02; data_00901 = data; } private static final byte[] data_01001; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_SPAN_LENGTH; data_01001 = data; } private static final byte[] data_01101; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_START_OFFSET_COMPENSATION; data_01101 = data; } private static final byte[] data_01201; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01201 = data; } private static final byte[] data_01202; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01202 = data; } private static final byte[] data_01211; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01211 = data; } private static final byte[] data_01212; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01212 = data; } private static final byte[] data_01221; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01221 = data; } private static final byte[] data_01222; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01222 = data; } private static final byte[] data_01231; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01231 = data; } private static final byte[] data_01232; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01232 = data; } private static final byte[] data_01241; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01241 = data; } private static final byte[] data_01242; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01242 = data; } private static final byte[] data_01251; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01251 = data; } private static final byte[] data_01252; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01252 = data; } private static final byte[] data_01261; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01261 = data; } private static final byte[] data_01262; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01262 = data; } private static final byte[] data_01271; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01271 = data; } private static final byte[] data_01272; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_TURN_OFF | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01272 = data; } private static final byte[] data_01301; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_LEAVE_AS_DEFAULT; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01301 = data; } private static final byte[] data_01302; static { int mask = CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_PEDAL_POWER_BALANCE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_ACCUMULATED_TORQUE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_WHEEL_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_CRANK_REVOLUTION_DATA_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_CONTENT_EXTREME_MAGNITUDES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_EXTREME_ANGLES_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_TOP_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_BOTTOM_DEAD_SPOT_ANGLE_LEAVE_AS_DEFAULT | CyclingPowerControlPoint.PARAMETER_VALUE_MASK_CYCLING_POWER_MEASURMENT_CHARACTERISTIC_ACCUMULATED_ENERGY_TURN_OFF; byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 1] = (byte) mask; data[ 2] = (byte) (mask >> 8); data_01302 = data; } private static final byte[] data_01401; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_SAMPLING_RATE; data_01401 = data; } private static final byte[] data_01501; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE; data_01501 = data; } private static final byte[] data_01601; static { byte[] data = new byte[1]; data[ 0] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data_01601 = data; } private static final byte[] data_01701; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CUMULATIVE_VALUE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_01701 = data; } private static final byte[] data_01702; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CUMULATIVE_VALUE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_01702 = data; } private static final byte[] data_01703; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CUMULATIVE_VALUE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_01703 = data; } private static final byte[] data_01704; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CUMULATIVE_VALUE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_01704 = data; } private static final byte[] data_01801; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_UPDATE_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_01801 = data; } private static final byte[] data_01802; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_UPDATE_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_01802 = data; } private static final byte[] data_01803; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_UPDATE_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_01803 = data; } private static final byte[] data_01804; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_UPDATE_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_01804 = data; } private static final byte[] data_01901; static { byte[] data = new byte[4]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = SensorLocationUtils.SENSOR_LOCATION_OTHER; data_01901 = data; } private static final byte[] data_01902; static { byte[] data = new byte[20]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = SensorLocationUtils.SENSOR_LOCATION_OTHER; data[ 4] = SensorLocationUtils.SENSOR_LOCATION_TOP_OF_SHOE; data[ 5] = SensorLocationUtils.SENSOR_LOCATION_IN_SHOE; data[ 6] = SensorLocationUtils.SENSOR_LOCATION_HIP; data[ 7] = SensorLocationUtils.SENSOR_LOCATION_FRONT_WHEEL; data[ 8] = SensorLocationUtils.SENSOR_LOCATION_LEFT_CRANK; data[ 9] = SensorLocationUtils.SENSOR_LOCATION_RIGHT_CRANK; data[10] = SensorLocationUtils.SENSOR_LOCATION_LEFT_PEDAL; data[11] = SensorLocationUtils.SENSOR_LOCATION_RIGHT_PEDAL; data[12] = SensorLocationUtils.SENSOR_LOCATION_FRONT_HUB; data[13] = SensorLocationUtils.SENSOR_LOCATION_REAR_DROPOUT; data[14] = SensorLocationUtils.SENSOR_LOCATION_CHAINSTAY; data[15] = SensorLocationUtils.SENSOR_LOCATION_REAR_WHEEL; data[16] = SensorLocationUtils.SENSOR_LOCATION_REAR_HUB; data[17] = SensorLocationUtils.SENSOR_LOCATION_CHEST; data[18] = SensorLocationUtils.SENSOR_LOCATION_SPIDER; data[19] = SensorLocationUtils.SENSOR_LOCATION_CHAIN_RING; data_01902 = data; } private static final byte[] data_01903; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_01903 = data; } private static final byte[] data_01904; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_01904 = data; } private static final byte[] data_01905; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SUPPORTED_SENSOR_LOCATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_01905 = data; } private static final byte[] data_02001; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_02001 = data; } private static final byte[] data_02002; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02002 = data; } private static final byte[] data_02003; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02003 = data; } private static final byte[] data_02004; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02004 = data; } private static final byte[] data_02101; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_02101 = data; } private static final byte[] data_02102; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02102 = data; } private static final byte[] data_02103; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02103 = data; } private static final byte[] data_02104; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CRANK_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02104 = data; } private static final byte[] data_02201; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_02201 = data; } private static final byte[] data_02202; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02202 = data; } private static final byte[] data_02203; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02203 = data; } private static final byte[] data_02204; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02204 = data; } private static final byte[] data_02301; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_02301 = data; } private static final byte[] data_02302; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02302 = data; } private static final byte[] data_02303; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02303 = data; } private static final byte[] data_02304; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02304 = data; } private static final byte[] data_02401; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_02401 = data; } private static final byte[] data_02402; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02402 = data; } private static final byte[] data_02403; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02403 = data; } private static final byte[] data_02404; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02404 = data; } private static final byte[] data_02501; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_02501 = data; } private static final byte[] data_02502; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02502 = data; } private static final byte[] data_02503; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02503 = data; } private static final byte[] data_02504; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_CHAIN_WEIGHT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02504 = data; } private static final byte[] data_02601; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_02601 = data; } private static final byte[] data_02602; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02602 = data; } private static final byte[] data_02603; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02603 = data; } private static final byte[] data_02604; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_SET_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02604 = data; } private static final byte[] data_02701; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_02701 = data; } private static final byte[] data_02702; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02702 = data; } private static final byte[] data_02703; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02703 = data; } private static final byte[] data_02704; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SPAN_LENGTH; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02704 = data; } private static final byte[] data_02801; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_02801 = data; } private static final byte[] data_02802; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02802 = data; } private static final byte[] data_02803; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02803 = data; } private static final byte[] data_02804; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02804 = data; } private static final byte[] data_02901; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data_02901 = data; } private static final byte[] data_02902; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_02902 = data; } private static final byte[] data_02903; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_02903 = data; } private static final byte[] data_02904; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_MASK_CYCLING_POWER_MEASUREMENT_CHARACTERISTIC_CONTENT; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_02904 = data; } private static final byte[] data_03001; static { byte[] data = new byte[4]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SAMPLING_RATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data_03001 = data; } private static final byte[] data_03002; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SAMPLING_RATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_03002 = data; } private static final byte[] data_03003; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SAMPLING_RATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_03003 = data; } private static final byte[] data_03004; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_SAMPLING_RATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_03004 = data; } private static final byte[] data_03101; static { byte[] data = new byte[10]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = (byte) 9999; data[ 4] = (byte) (9999 >> 8); data[ 5] = DateTimeUtils.MONTH_DECEMBER; data[ 6] = 31; data[ 7] = 23; data[ 8] = 59; data[ 9] = 59; data_03101 = data; } private static final byte[] data_03102; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_03102 = data; } private static final byte[] data_03103; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_03103 = data; } private static final byte[] data_03104; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_REQUEST_FACTORY_CALIBRATION_DATE; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data_03104 = data; } private static final byte[] data_03201; static { byte[] data = new byte[5]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x01; data[ 4] = 0x02; data_03201 = data; } private static final byte[] data_03202; static { byte[] data = new byte[6]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x08; data[ 4] = 0x00; data[ 5] = 0x00; data_03202 = data; } private static final byte[] data_03203; static { byte[] data = new byte[7]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_SUCCESS; data[ 3] = 0x08; data[ 4] = 0x00; data[ 5] = 0x01; data[ 6] = 0x02; data_03203 = data; } private static final byte[] data_03204; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED; data_03204 = data; } private static final byte[] data_03205; static { byte[] data = new byte[3]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_INVALID_PARAMETER; data_03205 = data; } private static final byte[] data_03206; static { byte[] data = new byte[4]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data[ 3] = CyclingPowerControlPoint.PARAMETER_VALUE_START_ENHANCED_OFFET_COMPENSATION_INCORRECT_CALIBRATION_POSITION; data_03206 = data; } private static final byte[] data_03207; static { byte[] data = new byte[7]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data[ 3] = (byte) CyclingPowerControlPoint.PARAMETER_VALUE_START_ENHANCED_OFFET_COMPENSATION_MANUFACTURER_SPECIFIC_ERROR_FOLLOWS; data[ 4] = 0x08; data[ 5] = 0x00; data[ 6] = 0x00; data_03207 = data; } private static final byte[] data_03208; static { byte[] data = new byte[8]; data[ 0] = CyclingPowerControlPoint.OP_CODES_RESPONSE_CODE; data[ 1] = CyclingPowerControlPoint.OP_CODES_START_ENHANCED_OFFSET_COMPENSATION; data[ 2] = CyclingPowerControlPoint.RESPONSE_VALUE_OPERATION_FAILED; data[ 3] = (byte) CyclingPowerControlPoint.PARAMETER_VALUE_START_ENHANCED_OFFET_COMPENSATION_MANUFACTURER_SPECIFIC_ERROR_FOLLOWS; data[ 4] = 0x08; data[ 5] = 0x00; data[ 6] = 0x01; data[ 7] = 0x02; data_03208 = data; } //@formatter:on private byte[] getData() { int index = -1; byte[] data = null; StackTraceElement[] stackTraceElementArray = Thread.currentThread().getStackTrace(); for (int i = 0; i < stackTraceElementArray.length; i++) { StackTraceElement stackTraceElement = stackTraceElementArray[i]; if ("getData".equals(stackTraceElement.getMethodName())) { index = i + 1; break; } } if (index >= 0 && index < stackTraceElementArray.length) { StackTraceElement stackTraceElement = stackTraceElementArray[index]; String[] splitted = stackTraceElement.getMethodName().split("_"); try { data = (byte[]) this.getClass().getDeclaredField("data_" + splitted[splitted.length - 1]).get(null); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } return data; } @Test public void test_constructor_00001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertTrue(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 5), result1.getParameterValue()); } @Test public void test_constructor_00101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertTrue(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 2), result1.getParameterValue()); } @Test public void test_constructor_00201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_00301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertTrue(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); } @Test public void test_constructor_00401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_00501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertTrue(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); } @Test public void test_constructor_00601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_00701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertTrue(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); } @Test public void test_constructor_00801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_00901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertTrue(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); } @Test public void test_constructor_01001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_01101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertTrue(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_01201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentPedalPowerBalanceLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentPedalPowerBalanceTurnOff()); } @Test public void test_constructor_01202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentPedalPowerBalanceLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentPedalPowerBalanceTurnOff()); } @Test public void test_constructor_01211() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedTorqueLeaveAsDfault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedTorqueTurnOff()); } @Test public void test_constructor_01212() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedTorqueLeaveAsDfault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedTorqueTurnOff()); } @Test public void test_constructor_01221() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentWheelRevolutionDataLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentWheelRevolutionDataTurnOff()); } @Test public void test_constructor_01222() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentWheelRevolutionDataLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentWheelRevolutionDataTurnOff()); } @Test public void test_constructor_01231() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentCrankRevolutionDataLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentCrankRevolutionDataTurnOff()); } @Test public void test_constructor_01232() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentCrankRevolutionDataLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentCrankRevolutionDataTurnOff()); } @Test public void test_constructor_01241() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeMagnitudesLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeMagnitudesTurnOff()); } @Test public void test_constructor_01242() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeMagnitudesLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeMagnitudesTurnOff()); } @Test public void test_constructor_01251() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeAnglesLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeAnglesTurnOff()); } @Test public void test_constructor_01252() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeAnglesLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentExtremeAnglesTurnOff()); } @Test public void test_constructor_01261() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentTopDeadSpotAngleLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentTopDeadSpotAngleTurnOff()); } @Test public void test_constructor_01262() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentTopDeadSpotAngleLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentTopDeadSpotAngleTurnOff()); } @Test public void test_constructor_01271() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentBottomDeadSpotAngleLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentBottomDeadSpotAngleTurnOff()); } @Test public void test_constructor_01272() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentBottomDeadSpotAngleLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentBottomDeadSpotAngleTurnOff()); } @Test public void test_constructor_01301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedEnergyLeaveAsDefault()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedEnergyTurnOff()); } @Test public void test_constructor_01302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 3), result1.getParameterValue()); assertFalse(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedEnergyLeaveAsDefault()); assertTrue(result1.isParameterValueMaskCyclingPowerMeasurementCharacteristicContentAccumulatedEnergyTurnOff()); } @Test public void test_constructor_01401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_01501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertTrue(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_01601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesResponseCode(result1.getOpCodes())); assertArrayEquals(Arrays.copyOfRange(data, 1, 1), result1.getParameterValue()); } @Test public void test_constructor_01701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertTrue(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertTrue(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertTrue(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertTrue(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertTrue(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertTrue(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertTrue(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertTrue(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 4), result1.getResponseParameter()); assertEquals(1, result1.getResponseParameter().length); assertTrue(SensorLocationUtils.isSensorLocationOhter(result1.getResponseParameter()[0])); } @Test public void test_constructor_01902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 20), result1.getResponseParameter()); assertEquals(17, result1.getResponseParameter().length); assertTrue(SensorLocationUtils.isSensorLocationOhter(result1.getResponseParameter()[0])); assertTrue(SensorLocationUtils.isSensorLocationTopOfShoe(result1.getResponseParameter()[1])); assertTrue(SensorLocationUtils.isSensorLocationInShoe(result1.getResponseParameter()[2])); assertTrue(SensorLocationUtils.isSensorLocationHip(result1.getResponseParameter()[3])); assertTrue(SensorLocationUtils.isSensorLocationFrontWheel(result1.getResponseParameter()[4])); assertTrue(SensorLocationUtils.isSensorLocationLeftCrank(result1.getResponseParameter()[5])); assertTrue(SensorLocationUtils.isSensorLocationRightCrank(result1.getResponseParameter()[6])); assertTrue(SensorLocationUtils.isSensorLocationLeftPedal(result1.getResponseParameter()[7])); assertTrue(SensorLocationUtils.isSensorLocationRightPedal(result1.getResponseParameter()[8])); assertTrue(SensorLocationUtils.isSensorLocationFrontHub(result1.getResponseParameter()[9])); assertTrue(SensorLocationUtils.isSensorLocationRearDropout(result1.getResponseParameter()[10])); assertTrue(SensorLocationUtils.isSensorLocationChainstay(result1.getResponseParameter()[11])); assertTrue(SensorLocationUtils.isSensorLocationRearWheel(result1.getResponseParameter()[12])); assertTrue(SensorLocationUtils.isSensorLocationRearHub(result1.getResponseParameter()[13])); assertTrue(SensorLocationUtils.isSensorLocationChest(result1.getResponseParameter()[14])); assertTrue(SensorLocationUtils.isSensorLocationSpider(result1.getResponseParameter()[15])); assertTrue(SensorLocationUtils.isSensorLocationChainRing(result1.getResponseParameter()[16])); } @Test public void test_constructor_01903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_01905() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); assertEquals(0x0201, BLEUtils.createUInt16(result1.getResponseParameter(), 0)); } @Test public void test_constructor_02102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); assertEquals(0x0201, BLEUtils.createUInt16(result1.getResponseParameter(), 0)); } @Test public void test_constructor_02302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02303() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02304() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02402() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02403() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02404() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); assertEquals(0x0201, BLEUtils.createUInt16(result1.getResponseParameter(), 0)); } @Test public void test_constructor_02502() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02503() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02504() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02602() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02603() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02604() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertTrue(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); assertEquals(0x0201, BLEUtils.createUInt16(result1.getResponseParameter(), 0)); } @Test public void test_constructor_02702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); } @Test public void test_constructor_02802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_02904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertTrue(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 4), result1.getResponseParameter()); assertEquals(0x01, result1.getResponseParameter()[0]); } @Test public void test_constructor_03002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 10), result1.getResponseParameter()); assertEquals(9999, BLEUtils.createUInt16(result1.getResponseParameter(), 0)); assertEquals(DateTimeUtils.MONTH_DECEMBER, result1.getResponseParameter()[2]); assertEquals(31, result1.getResponseParameter()[3]); assertEquals(23, result1.getResponseParameter()[4]); assertEquals(59, result1.getResponseParameter()[5]); assertEquals(59, result1.getResponseParameter()[6]); } @Test public void test_constructor_03102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 5), result1.getResponseParameter()); assertEquals(0x01, result1.getResponseParameter()[0]); assertEquals(0x02, result1.getResponseParameter()[1]); assertFalse(result1.hasManufacturerSpecificData()); } @Test public void test_constructor_03202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 6), result1.getResponseParameter()); assertEquals(0x08, result1.getResponseParameter()[0]); assertEquals(0x00, result1.getResponseParameter()[1]); assertEquals(0x00, result1.getResponseParameter()[2]); assertTrue(result1.hasManufacturerSpecificData()); assertEquals(0x0008, result1.getCompanyId()); assertEquals(0x00, result1.getManfacturerSpecificDataLength()); assertArrayEquals(Arrays.copyOfRange(data, 6, 6), result1.getManfacturerSpecificData()); } @Test public void test_constructor_03203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertTrue(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 7), result1.getResponseParameter()); assertEquals(0x08, result1.getResponseParameter()[0]); assertEquals(0x00, result1.getResponseParameter()[1]); assertEquals(0x01, result1.getResponseParameter()[2]); assertEquals(0x02, result1.getResponseParameter()[3]); assertTrue(result1.hasManufacturerSpecificData()); assertEquals(0x0008, result1.getCompanyId()); assertEquals(0x01, result1.getManfacturerSpecificDataLength()); assertArrayEquals(Arrays.copyOfRange(data, 6, 7), result1.getManfacturerSpecificData()); } @Test public void test_constructor_03204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertTrue(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03205() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertTrue(result1.isResponseValueInvalidParameter()); assertFalse(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 3), result1.getResponseParameter()); } @Test public void test_constructor_03206() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 4), result1.getResponseParameter()); assertEquals(data[3], result1.getResponseParameter()[0]); assertTrue(result1.isParameterValueStartEnhancedOffsetCompensationIncorrectCalibrationPosition()); assertFalse(result1.isParameterValueStartEnhancedOffsetCompensationManufacturerSpecificErrorFollows()); } @Test public void test_constructor_03207() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 7), result1.getResponseParameter()); assertEquals(data[3], result1.getResponseParameter()[0]); assertFalse(result1.isParameterValueStartEnhancedOffsetCompensationIncorrectCalibrationPosition()); assertTrue(result1.isParameterValueStartEnhancedOffsetCompensationManufacturerSpecificErrorFollows()); assertTrue(result1.hasManufacturerSpecificData()); assertEquals(0x0008, result1.getCompanyId()); assertEquals(0x00, result1.getManfacturerSpecificDataLength()); assertArrayEquals(Arrays.copyOfRange(data, 7, 7), result1.getManfacturerSpecificData()); } @Test public void test_constructor_03208() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertEquals(data[0], result1.getOpCodes()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getOpCodes())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getOpCodes())); assertFalse(result1.isOpCodesSetCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainLength(result1.getOpCodes())); assertFalse(result1.isOpCodesSetChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getOpCodes())); assertFalse(result1.isOpCodesSetSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getOpCodes())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getOpCodes())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getOpCodes())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getOpCodes())); assertFalse(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getOpCodes())); assertTrue(result1.isOpCodesResponseCode(result1.getOpCodes())); assertEquals(data[1], result1.getRequestOpCode()); assertFalse(result1.isOpCodesSetCumulativeValue(result1.getRequestOpCode())); assertFalse(result1.isOpCodesUpdateSensorLocation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSupportedSensorLocations(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestCrankLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestChainWeight(result1.getRequestOpCode())); assertFalse(result1.isOpCodesSetSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSpanLength(result1.getRequestOpCode())); assertFalse(result1.isOpCodesStartOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesMaskCyclingPowerMeasurementCharacteristicContent(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestSamplingRate(result1.getRequestOpCode())); assertFalse(result1.isOpCodesRequestFactoryCalibrationDate(result1.getRequestOpCode())); assertTrue(result1.isOpCodesStartEnhancedOffsetCompensation(result1.getRequestOpCode())); assertFalse(result1.isOpCodesResponseCode(result1.getRequestOpCode())); assertEquals(data[2], result1.getResponseValue()); assertFalse(result1.isResponseValueSuccess()); assertFalse(result1.isResponseValueOpCodeNotSupported()); assertFalse(result1.isResponseValueInvalidParameter()); assertTrue(result1.isResponseValueOperationFailed()); assertArrayEquals(Arrays.copyOfRange(data, 3, 8), result1.getResponseParameter()); assertEquals(data[3], result1.getResponseParameter()[0]); assertFalse(result1.isParameterValueStartEnhancedOffsetCompensationIncorrectCalibrationPosition()); assertTrue(result1.isParameterValueStartEnhancedOffsetCompensationManufacturerSpecificErrorFollows()); assertTrue(result1.hasManufacturerSpecificData()); assertEquals(0x0008, result1.getCompanyId()); assertEquals(0x01, result1.getManfacturerSpecificDataLength()); assertArrayEquals(Arrays.copyOfRange(data, 7, 8), result1.getManfacturerSpecificData()); } @Test public void test_constructor_03209() { int opCodes = 1; byte[] parameterValue = new byte[] { 2 }; int requestOpCode = 3; int responseValue = 4; byte[] responseParameter = new byte[] { 5 }; CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(opCodes, parameterValue, requestOpCode, responseValue, responseParameter); assertEquals(opCodes, result1.getOpCodes()); assertArrayEquals(parameterValue, result1.getParameterValue()); assertEquals(requestOpCode, result1.getRequestOpCode()); assertEquals(responseValue, result1.getResponseValue()); assertArrayEquals(responseParameter, result1.getResponseParameter()); } @Test public void test_parcelable_1_00001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_00901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01211() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01212() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01221() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01222() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01231() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01232() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01241() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01242() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01251() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01252() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01261() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01262() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01271() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01272() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_01905() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02303() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02304() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02402() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02403() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02404() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02502() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02503() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02504() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02602() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02603() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02604() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_02904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03205() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03206() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03207() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_1_03208() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); Parcel parcel = Parcel.obtain(); result1.writeToParcel(parcel, 0); parcel.setDataPosition(0); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromParcel(parcel); assertEquals(result1.getOpCodes(), result2.getOpCodes()); assertArrayEquals(result1.getParameterValue(), result2.getParameterValue()); assertEquals(result1.getRequestOpCode(), result2.getRequestOpCode()); assertEquals(result1.getResponseValue(), result2.getResponseValue()); assertArrayEquals(result1.getResponseParameter(), result2.getResponseParameter()); } @Test public void test_parcelable_2_00001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_00901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01211() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01212() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01221() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01222() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01231() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01232() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01241() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01242() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01251() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01252() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01261() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01262() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01271() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01272() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_01905() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02303() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02304() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02402() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02403() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02404() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02502() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02503() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02504() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02602() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02603() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02604() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_02904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03205() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03206() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03207() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_2_03208() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); assertArrayEquals(data, result1.getBytes()); } @Test public void test_parcelable_3_00001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_00901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01211() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01212() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01221() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01222() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01231() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01232() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01241() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01242() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01251() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01252() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01261() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01262() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01271() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01272() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_01905() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02301() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02302() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02303() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02304() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02401() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02402() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02403() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02404() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02501() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02502() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02503() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02504() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02601() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02602() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02603() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02604() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02701() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02702() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02703() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02704() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02801() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02802() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02803() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02804() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02901() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02902() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02903() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_02904() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03001() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03002() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03003() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03004() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03101() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03102() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03103() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03104() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03201() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03202() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03203() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03204() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03205() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03206() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03207() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } @Test public void test_parcelable_3_03208() { byte[] data = getData(); BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(BASE_UUID, 0, 0); bluetoothGattCharacteristic.setValue(data); CyclingPowerControlPointAndroid result1 = new CyclingPowerControlPointAndroid(bluetoothGattCharacteristic); CyclingPowerControlPointAndroid result2 = CyclingPowerControlPointAndroid.CREATOR.createFromByteArray(data); assertArrayEquals(result1.getBytes(), result2.getBytes()); } }
59.57524
160
0.764214
6fb7454fdde8dffbc921cb7d83565b8fb1f71854
1,827
package com.ye.gdufs.service; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import org.hibernate.Session; import com.ye.gdufs.dao.PageDao; import com.ye.gdufs.dao.PageDaoImpl; import com.ye.gdufs.model.Page; import com.ye.gdufs.model.PageSer; public class PagePro { Page page = new Page(); PageSer pageSer = new PageSer(); PageDao pageDao; public PagePro(){} public void setUid(long uid) { page.setUid(uid); setSerName(Long.toHexString(uid)); } public void setUrl(String url) { page.setUrl(url); } public void setContentMd5(String contentMd5) { page.setContentMd5(contentMd5); } public void setTitleFrequency(int titleFrequency) { page.setTitleFrequency(titleFrequency); } public void setBodyFrequency(int bodyFrequency) { page.setBodyFrequency(bodyFrequency); } private void setSerName(String serName) { page.setSerName(serName); } public void setTitleSegments(List<String> titleSegments) { pageSer.setTitleSegments(titleSegments); } public void setTitlePostags(List<String> titlePostags) { pageSer.setTitlePostags(titlePostags); } public void setTitleNers(List<String> titleNers) { pageSer.setTitleNers(titleNers); } public void setBodySegments(List<List<String>> bodySegments) { pageSer.setBodySegments(bodySegments); } public void setBodyPostags(List<List<String>> bodyPostags) { pageSer.setBodyPostags(bodyPostags); } public void setBodyNers(List<List<String>> bodyNers) { pageSer.setBodyNers(bodyNers); } private void initPageDao(){ if(pageDao == null){ pageDao = new PageDaoImpl(page,pageSer); } } public void rsave(Session session) throws FileNotFoundException, IOException { initPageDao(); pageDao.rsave(session); } public void rrollback(){ initPageDao(); pageDao.rrollback(); } }
22.012048
79
0.751505
66b8b5941c011e3fe947bac8c10edd26d848c1bd
2,065
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openjena.atlas.io; import java.io.IOException ; import java.io.Writer ; import org.openjena.atlas.lib.BitsInt ; import org.openjena.atlas.lib.Chars ; public class OutputUtils { /** Print the number x in width hex chars. x must fit */ public static void printHex(StringBuilder out, int x, int width) { for ( int i = width-1 ; i >= 0 ; i-- ) x = oneHex(out, x, i) ; } /** Print one hex digit of the number */ public static int oneHex(StringBuilder out, int x, int i) { int y = BitsInt.unpack(x, 4*i, 4*i+4) ; char charHex = Chars.hexDigitsUC[y] ; out.append(charHex) ; return BitsInt.clear(x, 4*i, 4*i+4) ; } /** Print the number x in width hex chars. x must fit */ public static void printHex(Writer out, int x, int width) { for ( int i = width-1 ; i >= 0 ; i-- ) x = oneHex(out, x, i) ; } /** Print one hex digit of the numer */ public static int oneHex(Writer out, int x, int i) { int y = BitsInt.unpack(x, 4*i, 4*i+4) ; char charHex = Chars.hexDigitsUC[y] ; try { out.write(charHex) ; } catch (IOException ex) {} return BitsInt.clear(x, 4*i, 4*i+4) ; } }
32.265625
75
0.641162
4cb8a0cdadae83d52fc65de0de67b1ca10fe3438
3,412
/** * Java SOCKS Proxy code originally from http://sourceforge.net/projects/jsocks/ * Listed Developers: Kirill Kouzoubov, Robert Simac (2010) * * Licensed by original developers under the GNU Library or Lesser General Public License (LGPL). * * Recent contributions by Jonathan West, 2012. */ package com.jsocksproxy.test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; /** Plain SOCKS unaware echo client. */ public class Echo implements Runnable { // private int port; private InetAddress _peerIp; private Socket _ss; private InputStream _in; private OutputStream _out; // private static final int BUF_SIZE = 1024; public Echo(String host, int port, String peerHost, int peerPort) throws IOException, UnknownHostException { this._peerIp = InetAddress.getByName(peerHost); // this.port = port; _ss = new Socket(host, port, _peerIp, peerPort); _out = _ss.getOutputStream(); _in = _ss.getInputStream(); System.out.println("Connected..."); System.out.println("TO: " + host + ":" + port); System.out.println("LocalAddress: " + _ss.getLocalAddress().getHostAddress() + ":" + _ss.getLocalPort()); } public Echo(String host, int port) throws IOException, UnknownHostException { System.out.println("Connecting..."); _ss = new Socket(host, port); _out = _ss.getOutputStream(); _in = _ss.getInputStream(); System.out.println("TO: " + host + ":" + port); System.out.println("LocalAddress: " + _ss.getLocalAddress().getHostAddress() + ":" + _ss.getLocalPort()); } public void send(String s) throws IOException { // System.out.println("Sending:"+s); _out.write(s.getBytes()); } public void run() { byte[] buf = new byte[1024]; int bytes_read; try { while ((bytes_read = _in.read(buf)) > 0) { System.out.write(buf, 0, bytes_read); System.out.flush(); } } catch (IOException io_ex) { io_ex.printStackTrace(); } } public static void usage() { System.err.print("Usage: java Echo host port [peerHost peerPort]\n"); } public static void main(String args[]) { int port; String host, peerHost; int peerPort; Echo echo = null; if (args.length > 1) { try { host = args[0]; port = Integer.parseInt(args[1]); if (args.length == 4) { peerHost = args[2]; peerPort = Integer.parseInt(args[3]); echo = new Echo(host, port, peerHost, peerPort); } else { echo = new Echo(host, port); } Thread thread = new Thread(echo); thread.start(); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; s = in.readLine(); Thread.currentThread().setPriority(Thread.NORM_PRIORITY); while (s != null) { echo.send(s + "\r\n"); s = in.readLine(); } } catch (IOException io_ex) { io_ex.printStackTrace(); System.exit(1); } catch (NumberFormatException num_ex) { usage(); num_ex.printStackTrace(); System.exit(1); } finally { if (echo != null) try { echo._ss.close(); } catch (Exception e) { } } } else { usage(); } } }// End of class
25.654135
110
0.635991
5da6feec4a8d3d4fe88df1757a4345cc9f725c44
5,239
/* Copyright (C) 2010 Alexandre Riazanov (Alexander Ryazanov) * * The copyright owner licenses this file to You under the Apache License, * Version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package logic.is.power.logic_warehouse; import java.util.Collection; import java.util.Iterator; public class IndividualConstant extends FunctionalSymbol implements Term { // Abstract in Symbol: public final String name() { return _name; } // Methods prescribed by the interface Term: public final java.util.Iterator<Term> iterator() { return new Term.Iterator(this); } public final int kind() { return Term.Kind.IndividualConstant; } public final boolean isIndividualConstant() { return true; } public final boolean isIndividualValued() { return true; } public final boolean isPair() { return false; } public final boolean isFormula() { return false; } public final boolean isAbstraction() { return false; } /** @return <code>this</code> */ public final Symbol topSymbol() { return this; } public final boolean equals(Term term) { return term.kind() == Term.Kind.IndividualConstant && _name.equals(((IndividualConstant)term)._name); } public final boolean equalsModuloSubst2(Term term) { return (term.kind() == Term.Kind.IndividualConstant && _name.equals(((IndividualConstant)term)._name)) || (term.isVariable() && ((Variable)term).isInstantiated2() && ((Variable)term).instance2().isIndividualConstant() && equals(((Variable)term).instance2().individualConstant())); } public final boolean equalsModuloSubst3(Term term) { return term.kind() == Term.Kind.IndividualConstant && _name.equals(((IndividualConstant)term)._name); } public final boolean equals(Flatterm flatterm) { return flatterm.isIndividualConstant() && this == flatterm.individualConstant(); } public final boolean containsVariableAsProperSubterm(Variable var) { return false; } public final boolean containsAsProperSubterm(Term term) { return false; } public final boolean containsAsProperSubtermModuloSubst2(Term term) { return false; } public final boolean containsAsProperSubtermModuloSubst3(Term term) { return false; } public final Term subtermInPosition(int n) { assert n == 0; return this; } public final int depthOfPosition(int n) { assert n == 0; return 0; } public final int positionOfSubterm(Term term) { assert !term.isPair(); if (this == term) return 0; return -1; } public final int mapPositionWithSubst1(int n) { assert n == 0; return 0; } public final void collectFreeVariables(Collection<Variable> result) { // nothing here } public final boolean containsFreeVariables() { return false; } public final boolean containsVariables() { return false; } public final boolean containsFreeVariables(Collection<Variable> exclusions) { return false; } public final int depth() { return 0; } public final int numberOfSymbols() { return 1; } public final int numberOfSymbolsAfterSubst1() { return 1; } /** Counts all nonvariable symbols <code>sym</code>, * including logical symbols, but excluding pair constructors * and abstraction operators, such that * <code>sym.category(modulus) == category</code>. */ public final int numberOfNonvariableSymbolsFromCategory(int category, int modulus) { return (category(modulus) == category)? 1 : 0; } /** Counts all nonvariable symbols <code>sym</code>, * including logical symbols, but excluding pair constructors * and abstraction operators, such that * <code>sym.category(modulus) == category</code>, * for every <code>category</code> in <code>[0,modulus - 1]</code>, * and adds the numbers to the corresponding values in * <code>result[category]</code>. */ public final void addNumberOfNonvariableSymbolsFromCategories(int modulus, int[] result) { result[this.category(modulus)] += 1; } // addNumberOfNonvariableSymbolsFromCategories(int modulus, public String toString(boolean closed) { return _name; } //public final int hashCode() { // return _name.hashCode(); // } // Package access methods: /** Note that this constructor has package access; objects of this class * can only be created/destroyed inside Signature. */ IndividualConstant(String name) { super(); _name = name; } // Data: private final String _name; }; // class IndividualConstant
26.064677
78
0.671502
681670eec66d06dae0e2a1f5c7f3b500115a49ca
2,544
package com.jantvrdik.intellij.latte.inspections; import com.intellij.codeInspection.InspectionManager; import com.intellij.codeInspection.LocalInspectionTool; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.ProblemHighlightType; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiRecursiveElementWalkingVisitor; import com.jantvrdik.intellij.latte.config.LatteConfiguration; import com.jantvrdik.intellij.latte.psi.*; import com.jantvrdik.intellij.latte.settings.LatteTagSettings; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; public class ModifierNotAllowedInspection extends LocalInspectionTool { @NotNull @Override public String getShortName() { return "ModifierNotAllowed"; } @Nullable @Override public ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull final InspectionManager manager, final boolean isOnTheFly) { if (!(file instanceof LatteFile)) { return null; } final List<ProblemDescriptor> problems = new ArrayList<>(); file.acceptChildren(new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) { if (element instanceof LatteMacroTag) { checkClassicMacro((LatteMacroTag) element, problems, manager, isOnTheFly); } else { super.visitElement(element); } } }); return problems.toArray(new ProblemDescriptor[0]); } private static void checkClassicMacro( LatteMacroTag macroTag, @NotNull List<ProblemDescriptor> problems, @NotNull final InspectionManager manager, final boolean isOnTheFly ) { String name = macroTag.getMacroName(); LatteTagSettings macro = LatteConfiguration.getInstance(macroTag.getProject()).getTag(name); if (macro == null || macro.isAllowedModifiers()) { return; } LatteMacroContent content = macroTag.getMacroContent(); if (content == null) { return; } content.acceptChildren(new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) { if (element instanceof LatteMacroModifier && !((LatteMacroModifier) element).isVariableModifier()) { String description = "Filters are not allowed here"; ProblemDescriptor problem = manager.createProblemDescriptor(element, description, true, ProblemHighlightType.GENERIC_ERROR, isOnTheFly); problems.add(problem); } else { super.visitElement(element); } } }); } }
31.02439
141
0.770047
125256649a014e0a1dac1cc3564c25b48f6f2948
7,477
package transport; import java.util.*; public class Main { public static ArrayList<AbstractAnimals> filteredList = new ArrayList<AbstractAnimals>(); public static void testCondition(ArrayList<AbstractAnimals> animals, CheckVehicle tester) { filteredList.clear(); for (AbstractAnimals animal : animals) { if (tester.test(animal)) { System.out.println(animal.getName() + ", " + animal.getYear()); filteredList.add(animal); } } } public static void main(String[] args) { /* * Horse seabiscuit = new Horse("Seabiscuit"); Horse affirmed = new * Horse("Affirmed"); Horse joe = new Horse("Joe"); * * seabiscuit.eat(10); affirmed.eat(5); for (int i = 0; i < 3; i++) { * seabiscuit.move(); } System.out.println("Seabiscuit's fuel = " + * seabiscuit.getFuelLevel()); * * System.out.println("\n***FROM ABSTRACT CLASS***"); * * HorseFromVehicle secretariat = new HorseFromVehicle("Secretariat", 10); * * secretariat.addFuel(10); System.out.println("Secretariat fuel = " + * secretariat.getFuelLevel()); * * HorseFromVehicle eclipse = new HorseFromVehicle("Eclipse"); * System.out.println("Eclipse fuel = " + eclipse.getFuelLevel()); * * Auto vw = new Auto(1, "Eurovan", 2000); Auto toyota = new Auto(10, "Tundra", * 1998); Auto honda = new Auto(5, "Accord", 2003); vw.move(); vw.move(5); * toyota.move(20); * * HorseFromVehicle trigger = new HorseFromVehicle("Trigger", 10); * HorseFromVehicle seattleSlew = new HorseFromVehicle("Seattle Slew", 10); * HorseFromVehicle americanPharoah = new HorseFromVehicle("American Pharoah", * 10); * * ArrayList<AbstractVehicle> myList = new ArrayList<AbstractVehicle>(); * * myList.add(secretariat); myList.add(trigger); myList.add(seattleSlew); * myList.add(americanPharoah); myList.add(eclipse); myList.add(vw); * myList.add(toyota); myList.add(honda); System.out.println(); * System.out.println("*** This List ***"); * System.out.println(myList.toString()); * * System.out.println(); * System.out.println("*** Horses with Negative Fuel ***"); * printVehicles(myList, v -> v.getFuelLevel() < 1); System.out.println(); * System.out.println("\n*** Horses with Positive Fuel ***"); * printVehicles(myList, v -> v.getFuelLevel() > 0 && (v instanceof * HorseFromVehicle)); * * // System.out.println(); // filteredList.sort() * * System.out.println(); // sort * System.out.println("\n*** Sorted Vehicles ***"); myList.sort((v1, v2) -> * v1.getName().compareToIgnoreCase(v2.getName())); myList.forEach((v) -> * System.out.println(v.getName())); System.out.println(); */ ArrayList<AbstractAnimals> animalList = new ArrayList<AbstractAnimals>(); // collection 1 System.out.println("\n*** Mammals ***\n"); System.out.println(); AbstractAnimals panda = new Mammal("Panda", 1869); AbstractAnimals zebra = new Mammal("Zebra", 1778); AbstractAnimals koala = new Mammal("Koala", 1816); AbstractAnimals sloth = new Mammal("Sloth", 1804); AbstractAnimals armadillo = new Mammal("Armadillo", 1758); AbstractAnimals raccoon = new Mammal("Raccoon", 1758); AbstractAnimals bigfoot = new Mammal("Bigfoot", 2021); animalList.add(panda); animalList.add(zebra); animalList.add(koala); animalList.add(sloth); animalList.add(armadillo); animalList.add(raccoon); animalList.add(bigfoot); System.out.println(); // collection 2 System.out.println("\n*** Birds ***\n"); System.out.println(); AbstractAnimals pigeon = new Bird("Pigeon", 1837); AbstractAnimals peacock = new Bird("Peacock", 1821); AbstractAnimals toucan = new Bird("Toucan", 1758); AbstractAnimals parrot = new Bird("Parrot", 1824); AbstractAnimals swan = new Bird("Swan", 1758); animalList.add(peacock); animalList.add(pigeon); animalList.add(toucan); animalList.add(parrot); animalList.add(swan); System.out.println(); // collection 3 System.out.println("\n*** Fish ***\n"); System.out.println(); AbstractAnimals salmon = new Fish("Salmon", 1758); AbstractAnimals catfish = new Fish("Catfish", 1817); AbstractAnimals perch = new Fish("Perch", 1758); animalList.add(salmon); animalList.add(catfish); animalList.add(perch); System.out.println(); System.out.println("\n*** Animal List ***\n"); System.out.println(animalList.toString()); System.out.println("\n*** animals in descending order by year named ***\n"); animalList.sort((animal1, animal2) -> animal2.getYear() - animal1.getYear()); animalList.forEach((animal) -> System.out.println(animal.getName() + " " + animal.getYear())); System.out.println(); System.out.println("\n*** animals alphabetically ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); animalList.forEach((animal) -> System.out.println(animal.getName() + " " + animal.getYear())); System.out.println(); System.out.println("\n*** animals ordered by how they move ***\n"); animalList.sort((animal1, animal2) -> animal1.move().compareToIgnoreCase(animal2.move())); animalList.forEach((animal) -> System.out.println(animal.getName() + " " + animal.getYear())); System.out.println(); System.out.println("\n*** animals that breathe with lungs ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); testCondition(animalList, animal -> animal.breathe() == "lungs"); System.out.println(); System.out.println("\n*** animals that breathe with lungs and were named in 1758 ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); testCondition(animalList, animal -> animal.breathe() == "lungs" && animal.getYear() == 1758); System.out.println(); System.out.println("\n*** animals that lay eggs and breathe with lungs ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); testCondition(animalList, animal -> animal.breathe() == "lungs" && animal.reproduce() == "eggs"); System.out.println(); System.out.println("\n*** animals that were named in 1758 ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); testCondition(animalList, animal -> animal.getYear() == 1758); System.out.println(); System.out.println("\n*** animals that are mammals ***\n"); animalList.sort((animal1, animal2) -> animal1.getName().compareToIgnoreCase(animal2.getName())); testCondition(animalList, animal -> animal.getAnimalClass().equalsIgnoreCase("Mammal")); System.out.println(); } }
46.440994
105
0.603049
8a0b586e65ce0038dd35108942d8af67976d5cc0
2,043
package com.example.walkitoff; public class SoundList { /* this class is to be used by the Alarm class. it functions as a library of sounds that the user can choose from, all stored in an array */ private static final int NUMBER_OF_ALL_SOUNDS = 4; private int arrayCapacity, level; /** * constructor */ public SoundList(int level ){ this.level = level; if( level < NUMBER_OF_ALL_SOUNDS ){ arrayCapacity = level + 1; } else{ arrayCapacity = NUMBER_OF_ALL_SOUNDS; } } /** * adds a sound to an array if it has the capacity for it and returns the updated array * * @param array - the array to add sound name to * * @param arraySize - how many sound names are in the array * * @param soundName - the sound name that can appear on the menu * * @return array */ private String[] addSound( String[] array, int arraySize, String soundName ){ if( arraySize < arrayCapacity ){ array[ arraySize ] = soundName; } return array; } /** * adds all unlocked sounds to the array. * <p> * note: uses score object to determine which sounds to add */ public String[] addAllUnlockedSounds(){ String[] unlockedSoundArray = new String[ arrayCapacity ]; int arraySize = 0; // TODO: add sounds without the repetition shown below // maybe map each level to a sound name? unlockedSoundArray = addSound( unlockedSoundArray, arraySize, SoundName.DEFAULT_SOUND ); arraySize++; unlockedSoundArray = addSound( unlockedSoundArray, arraySize, SoundName.SOUND_ONE ); arraySize++; unlockedSoundArray = addSound( unlockedSoundArray, arraySize, SoundName.SOUND_TWO ); arraySize++; unlockedSoundArray = addSound( unlockedSoundArray, arraySize, SoundName.SOUND_THREE ); arraySize++; return unlockedSoundArray; } }
24.035294
96
0.618698
4bb75a60d43c9bc15a06c413f3e8a921982fd6ed
12,932
package ca.sykesdev.tpexp.Commands; import ca.sykesdev.tpexp.Models.Transaction; import ca.sykesdev.tpexp.TPExp; import ca.sykesdev.tpexp.Utils.Data; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import ca.sykesdev.tpexp.Utils.Message; import java.util.HashMap; /** * The default teleport command to a particular set of coordinates */ public class TPExpCommandExecutor implements CommandExecutor { /** * P2P = Player to Player * P2S = Player to Self */ public enum RequestType { P2P, P2S } private TPExp plugin; private HashMap<String, Transaction> transactions = new Data().getTransactions(); public TPExpCommandExecutor(TPExp pl) { this.plugin = pl; } /** * Register the teleport transaction * * @param player The player for this transaction * @param cost The cost of the transaction * @param targetLocation The target location to take the player when this transaction is fulfilled */ private void registerTransaction(Player player, int cost, Location targetLocation, RequestType type) { // Check for existing transaction String uuid = player.getUniqueId().toString(); if (this.transactions.containsKey(uuid)) { this.transactions.remove(uuid); } // Store transaction in map this.transactions.put(uuid, new Transaction(player, cost, targetLocation, type)); } /** * Register the teleport transaction (P2P) * * @param player The player for this transaction * @param targetPlayer The player to teleport to * @param cost The cost of the transaction * @param targetLocation The targetPlayer location to take the player when this transaction is fulfilled */ private void registerTransaction(Player player, int cost, Location targetLocation, RequestType type, Player targetPlayer) { // Check for existing transaction String uuid = targetPlayer.getUniqueId().toString(); if (this.transactions.containsKey(uuid)) { this.transactions.remove(uuid); } // Store transaction in map this.transactions.put(uuid, new Transaction(player, targetPlayer, cost, targetLocation, type)); } private void fulfillTransaction(String uuid) { Transaction transaction = this.transactions.get(uuid); if (transaction.getType() == RequestType.P2P) { if (transaction.fulfillTransactionP2P()) { // Remove transaction from pending this.transactions.remove(uuid); } } else { if (transaction.fulfillTransaction()) { // Remove transaction from pending this.transactions.remove(uuid); } } } /** * Accepts a generic teleport transaction request. * @param p The player who is accepting the request */ private void acceptTeleportTransaction(Player p) { if (this.transactions.containsKey(p.getUniqueId().toString())) { if (this.transactions.get(p.getUniqueId().toString()).getType() == RequestType.P2P) { // This is a player-to-player request... must be accepted by target player this.fulfillTransaction(p.getUniqueId().toString()); } else { this.fulfillTransaction(p.getUniqueId().toString()); } } else { p.sendMessage(Message.formatMessage("No transactions pending...")); } } /** * Deny a generic teleport transaction request. * @param p The player who is denying the request */ private void denyTeleportTransaction(Player p) { if (this.transactions.containsKey(p.getUniqueId().toString())) { if (this.transactions.get(p.getUniqueId().toString()).getType() == RequestType.P2P) { // This is a player-to-player request... must be denied by target player this.transactions.get(p.getUniqueId().toString()).getPlayer(). sendMessage(Message.formatMessage( "Your Teleport request to " + ChatColor.GOLD + p.getDisplayName() + " was denied...")); } p.sendMessage(Message.formatMessage(ChatColor.BOLD + "Teleport request denied..")); this.transactions.remove(p.getUniqueId().toString()); } else { p.sendMessage(Message.formatMessage("No transactions pending...")); } } /** * Create a teleport transaction to a set of coordinates (point) * @param p The player making the request * @param costPerBlock The cost per block travelled for this request * @param x The target x coordinate * @param y The target y coordinate * @param z The target z coordinate */ private void createPointTransaction(Player p, double costPerBlock, double x, double y, double z) { try { // Calculate cost for player Location sourceLocation = p.getLocation(); Location targetLocation = new Location(p.getWorld(), x, y, z); double totalCost = sourceLocation.distance(targetLocation) * costPerBlock; p.sendMessage(Message.formatMessage(ChatColor.translateAlternateColorCodes('&', "This teleport to" + ChatColor.GOLD + " [" + x + "," + y + "," + z + "] " + ChatColor.WHITE + " will cost you &6" + Math.round(totalCost) + "xp! &fIf you accept enter: &6/tpexp accept&f"))); // Register this transaction this.registerTransaction(p, (int) totalCost, targetLocation, RequestType.P2S); } catch (NumberFormatException e) { p.sendMessage(Message.formatMessage(ChatColor.translateAlternateColorCodes('&', "&4Problem parsing arguments...please see usage details.."))); } } /** * Creates a player teleport transaction request * @param p The player making the request * @param targetPlayer The player who p wants to teleport to * @param costPerBlock The cost per block travelled for this request */ private void createPlayerTransaction(Player p, Player targetPlayer, double costPerBlock) { if (targetPlayer != null && targetPlayer.isOnline() && targetPlayer != p) { p.sendMessage(Message.formatMessage("Sending teleport request to " + ChatColor.GOLD + targetPlayer.getDisplayName())); // Calculate cost and get locations Location sourceLocation = p.getLocation(); Location targetLocation = targetPlayer.getLocation(); double totalCost = sourceLocation.distance(targetLocation) * costPerBlock; p.sendMessage(Message.formatMessage("This teleport request will cost " + ChatColor.GOLD + Math.round(totalCost) + "xp!")); // Create the transaction (p2p target incl.) this.registerTransaction(p, (int) totalCost, targetLocation, RequestType.P2P, targetPlayer); targetPlayer.sendMessage(Message.formatMessage(ChatColor.WHITE + "You have a teleport request from " + ChatColor.WHITE + p.getDisplayName() + ChatColor.WHITE + " type " + ChatColor.GOLD + "/tpexp accept" + ChatColor.WHITE + " to accept the request... or " + ChatColor.GOLD + "/tpexp deny " + ChatColor.WHITE + " to deny")); } else if (targetPlayer == p) { p.sendMessage(Message.formatMessage(ChatColor.RED + "You can't request to teleport to yourself!")); } else { p.sendMessage(Message.formatMessage(ChatColor.RED + "Invalid player specification...are they online?")); } } /** * The Command handler for tpexp base command and its sub-commands * @param sender The entity sending the Command * @param command The command being sent * @param label The label of the command (ie: tpexp) same as command.getName() * @param args The arguments passed with the command (sub-commands use) * @return True iff command was successful! */ @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { double costPerBlock = this.plugin.getConfig().getDouble("costPerBlock"); if (label.equalsIgnoreCase("tpexp")) { if (args.length == 0) { sender.sendMessage(Message.formatMessage("TPExp is a simple teleport plugin that assigns exp cost to teleports" + "\nUsage: /tpexp " + ChatColor.GOLD + "[ point | player ] " + ChatColor.WHITE + "\n/tpexp point " + ChatColor.GOLD + "[X] [Y] [Z]" + ChatColor.WHITE + "" + "\n/tpexp player" + ChatColor.GOLD + "[ player_name ] " + ChatColor.WHITE + "" + "\n/tpexp " + ChatColor.GOLD + "[ accept | deny ]")); } else if (args.length == 1 && args[0].equalsIgnoreCase("reload") && sender.hasPermission("tpexp.admin")) { sender.sendMessage(Message.formatMessage("Reloading configuration...")); this.plugin.reloadConfig(); sender.sendMessage(Message.formatMessage("Reloaded configuration!")); } else { if (sender instanceof Player) { Player p = (Player) sender; // Check for proper permissions if (sender.hasPermission("tpexp.player")) { // Check for sub-commands and their arugments switch (args[0]) { case "point": if (args.length == 4) { try { double x = Double.parseDouble(args[1]); double y = Double.parseDouble(args[2]); double z = Double.parseDouble(args[3]); this.createPointTransaction(p, costPerBlock, x, y, z); } catch (NumberFormatException e) { p.sendMessage(Message.formatMessage(ChatColor.translateAlternateColorCodes('&', "&4Problem parsing arguments...please see usage details.."))); } return true; } break; case "player": if (args.length == 2) { Player targetPlayer = Bukkit.getPlayer(args[1]); this.createPlayerTransaction(p, targetPlayer, costPerBlock); } else { p.sendMessage(Message.formatMessage(ChatColor.RED + "Invalid number of arguments...see usage")); } break; case "accept": this.acceptTeleportTransaction(p); break; case "acceptTpRequest": this.acceptTeleportTransaction(p); case "deny": this.denyTeleportTransaction(p); break; case "denyTpRequest": this.denyTeleportTransaction(p); break; default: p.sendMessage(Message.formatMessage(ChatColor.RED + "Invalid usage...see usage details")); } } else { p.sendMessage(Message.formatMessage(ChatColor.translateAlternateColorCodes('&', "&fNo Arguments supplied..."))); return false; } } else { sender.sendMessage(Message.formatMessage("This command can only be sent by players...")); } } } else { sender.sendMessage(Message.formatMessage(ChatColor.translateAlternateColorCodes('&', "&4Couldn't understand your command"))); } return true; } }
45.858156
132
0.556836
e850b2d63d93c7fcde01f481e287dae9c0bf0356
5,268
package common.corba.recordInterfaceManager; /** * Interface definition for the remote functionality being given by the server to the client * * @author Daniel Ricci <thedanny09 * @gmail .com> * */ public abstract class IRecordManagerPOA extends org.omg.PortableServer.Servant implements IRecordManagerOperations, org.omg.CORBA.portable.InvokeHandler { public IRecordManager _this() { return IRecordManagerHelper.narrow(_this_object()); } public IRecordManager _this(org.omg.CORBA.ORB orb) { return IRecordManagerHelper.narrow(_this_object(orb)); } private static String [] _ids_list = { "IDL:common/corba/recordInterfaceManager/IRecordManager:1.0" }; public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId) { return _ids_list; } public final org.omg.CORBA.portable.OutputStream _invoke(final String opName, final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { if (opName.equals("createCRecord")) { return _invoke_createCRecord(_is, handler); } else if (opName.equals("createMRecord")) { return _invoke_createMRecord(_is, handler); } else if (opName.equals("editRecord")) { return _invoke_editRecord(_is, handler); } else if (opName.equals("getRecordCount")) { return _invoke_getRecordCount(_is, handler); } else if (opName.equals("transferRecord")) { return _invoke_transferRecord(_is, handler); } else { throw new org.omg.CORBA.BAD_OPERATION(opName); } } // helper methods private org.omg.CORBA.portable.OutputStream _invoke_createCRecord( final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream _output; String arg0_in = _is.read_string(); String arg1_in = _is.read_string(); String arg2_in = _is.read_string(); String arg3_in = _is.read_string(); common.corba.recordInterfaceManager.ReportStatus arg4_in = common.corba.recordInterfaceManager.ReportStatusHelper.read(_is); String _arg_result = createCRecord(arg0_in, arg1_in, arg2_in, arg3_in, arg4_in); _output = handler.createReply(); _output.write_string(_arg_result); return _output; } private org.omg.CORBA.portable.OutputStream _invoke_createMRecord( final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream _output; String arg0_in = _is.read_string(); String arg1_in = _is.read_string(); String arg2_in = _is.read_string(); String arg3_in = _is.read_string(); long arg4_in = _is.read_longlong(); String arg5_in = _is.read_string(); common.corba.recordInterfaceManager.ReportStatus arg6_in = common.corba.recordInterfaceManager.ReportStatusHelper.read(_is); String _arg_result = createMRecord(arg0_in, arg1_in, arg2_in, arg3_in, arg4_in, arg5_in, arg6_in); _output = handler.createReply(); _output.write_string(_arg_result); return _output; } private org.omg.CORBA.portable.OutputStream _invoke_editRecord( final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream _output; String arg0_in = _is.read_string(); String arg1_in = _is.read_string(); String arg2_in = _is.read_string(); common.corba.recordInterfaceManager.ReportStatus arg3_in = common.corba.recordInterfaceManager.ReportStatusHelper.read(_is); boolean _arg_result = editRecord(arg0_in, arg1_in, arg2_in, arg3_in); _output = handler.createReply(); _output.write_boolean(_arg_result); return _output; } private org.omg.CORBA.portable.OutputStream _invoke_getRecordCount( final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream _output; String arg0_in = _is.read_string(); String _arg_result = getRecordCount(arg0_in); _output = handler.createReply(); _output.write_string(_arg_result); return _output; } private org.omg.CORBA.portable.OutputStream _invoke_transferRecord( final org.omg.CORBA.portable.InputStream _is, final org.omg.CORBA.portable.ResponseHandler handler) { org.omg.CORBA.portable.OutputStream _output; String arg0_in = _is.read_string(); String arg1_in = _is.read_string(); String arg2_in = _is.read_string(); String _arg_result = transferRecord(arg0_in, arg1_in, arg2_in); _output = handler.createReply(); _output.write_string(_arg_result); return _output; } }
37.899281
133
0.658314
365b4beb8a1c637683e079d738461ef529d433c8
1,573
package com.dotmarketing.factories; import java.util.ArrayList; import java.util.List; import com.dotmarketing.beans.ChallengeQuestion; import com.dotmarketing.db.HibernateUtil; import com.dotmarketing.util.Logger; /** * This class was created to manage the challenge question search to db * @author Oswaldo * */ public class ChallengeQuestionFactory { /** * This Methods return the list of challenge questions * @author martin amaris * @return List */ public static List<ChallengeQuestion> getChallengeQuestionList() { List<ChallengeQuestion> result = null; try { HibernateUtil dh = new HibernateUtil(ChallengeQuestion.class); dh.setQuery("from challenge_question in class com.dotmarketing.beans.ChallengeQuestion"); result = dh.list(); } catch (Exception e) { Logger.error(ChallengeQuestionFactory.class, e.toString()); } return result; } /** * This Method return a specified challenge question by id * @author Armando Siem * @return ChallengeQuestion */ public static ChallengeQuestion getChallengeQuestionById(long challengeQuestionId) { ChallengeQuestion result = null; try { HibernateUtil dh = new HibernateUtil(ChallengeQuestion.class); dh.setQuery("from challenge_question in class com.dotmarketing.beans.ChallengeQuestion where cquestionid = ?"); dh.setParam(challengeQuestionId); result = (ChallengeQuestion) dh.load(); } catch (Exception e) { Logger.error(ChallengeQuestionFactory.class, e.toString()); } return result; } }
28.089286
115
0.724094
f9268ab4eaae24094dee123ff5a5130f0342b4df
304
package com.xmbl.ops.service; import com.alibaba.fastjson.JSONObject; /** * @author: sunbenbao * @Email: 1402614629@qq.com * @类名: WxLoginService * @创建时间: 2018年7月31日 下午9:14:03 * @修改时间: 2018年7月31日 下午9:14:03 * @类说明: */ public interface WxLoginService { void addOrUpd(JSONObject userInfo); }
16.888889
39
0.700658
3432fce4295dea8032ecc49c56ffd35d718e9c1c
21,594
package com.github.joelgodofwar.sps.util; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.bukkit.ChatColor; //This class is where all formatting methods are stored. @SuppressWarnings("unused") public class Format { //private static MineverseChat plugin = MineverseChat.getInstance(); public static final int LEGACY_COLOR_CODE_LENGTH = 2; public static final int HEX_COLOR_CODE_LENGTH = 14; public static final String DEFAULT_COLOR_CODE = String.valueOf(ChatColor.WHITE); public static final String HEX_COLOR_CODE_PREFIX = "#"; public static final String BUKKIT_COLOR_CODE_PREFIX = "�"; public static final String BUKKIT_HEX_COLOR_CODE_PREFIX = "x"; /**public static String convertToJson(MineverseChatPlayer sender, String format, String chat) { JsonFormat JSONformat = MineverseChat.jfInfo.getJsonFormat(sender.getJsonFormat()); String f = format.replace("\\", "\\\\").replace("\"", "\\\""); String c = chat.replace("\\", "\\\\").replace("\"", "\\\""); String json = "[\"\",{\"text\":\"\",\"extra\":["; String prefix = ""; String suffix = ""; try { prefix = FormatStringAll(MineverseChat.chat.getPlayerPrefix(sender.getPlayer())); suffix = FormatStringAll(MineverseChat.chat.getPlayerSuffix(sender.getPlayer())); if(suffix.equals("")) { suffix = "venturechat_no_suffix_code"; } if(prefix.equals("")) { prefix = "venturechat_no_prefix_code"; } } catch(Exception e) { System.out.println("Exception?" + e.getLocalizedMessage()); if(plugin.getConfig().getString("loglevel", "info").equals("debug")) { Bukkit.getConsoleSender().sendMessage(Format.FormatStringAll("&8[&eVentureChat&8]&e - Prefix and / or suffix don't exist, setting to nothing.")); } suffix = "venturechat_no_suffix_code"; prefix = "venturechat_no_prefix_code"; } String nickname = ""; if(sender.getPlayer() != null) { nickname = FormatStringAll(sender.getPlayer().getDisplayName()); } json += convertPlaceholders(f, JSONformat, prefix, nickname, suffix, sender); json += "]}"; json += "," + convertLinks(c); json += "]"; if(plugin.getConfig().getString("loglevel", "info").equals("debug")) { System.out.println(json); System.out.println("END OF JSON"); System.out.println("END OF JSON"); System.out.println("END OF JSON"); System.out.println("END OF JSON"); System.out.println("END OF JSON"); } return json; }*/ /**private static String convertPlaceholders(String s, JsonFormat format, String prefix, String nickname, String suffix, MineverseChatPlayer icp) { String remaining = s; String temp = ""; int indexStart = -1; int indexEnd = -1; String placeholder = ""; String lastCode = "�f"; do { Pattern pattern = Pattern.compile("(" + escapeAllRegex(prefix) + "|" + escapeAllRegex(nickname) + "|" + escapeAllRegex(suffix) + ")"); Matcher matcher = pattern.matcher(remaining); if(matcher.find()) { indexStart = matcher.start(); indexEnd = matcher.end(); placeholder = remaining.substring(indexStart, indexEnd); temp += convertToJsonColors(lastCode + remaining.substring(0, indexStart)) + ","; lastCode = getLastCode(lastCode + remaining.substring(0, indexStart)); String action = ""; String text = ""; String hover = ""; if(placeholder.contains(prefix)) { action = format.getClickPrefix(); text = PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), format.getClickPrefixText()); for(String st : format.getHoverTextPrefix()) { hover += Format.FormatStringAll(st) + "\n"; } } if(placeholder.contains(nickname)) { action = format.getClickName(); text = PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), format.getClickNameText()); for(String st : format.getHoverTextName()) { hover += Format.FormatStringAll(st) + "\n"; } } if(placeholder.contains(suffix)) { action = format.getClickSuffix(); text = PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), format.getClickSuffixText()); for(String st : format.getHoverTextSuffix()) { hover += Format.FormatStringAll(st) + "\n"; } } hover = PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), hover.substring(0, hover.length() - 1)); temp += convertToJsonColors(lastCode + placeholder, ",\"clickEvent\":{\"action\":\"" + action + "\",\"value\":\"" + text + "\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[" + convertToJsonColors(hover) + "]}}") + ","; lastCode = getLastCode(lastCode + placeholder); remaining = remaining.substring(indexEnd); } else { temp += convertToJsonColors(lastCode + remaining); break; } } while(true); return temp; }*/ /**private static String convertLinks(String s) { String remaining = s; String temp = ""; int indexLink = -1; int indexLinkEnd = -1; String link = ""; String lastCode = "�f"; do { Pattern pattern = Pattern.compile("([a-zA-Z0-9�\\-:/]+\\.[a-zA-Z/0-9�\\-:_#]+(\\.[a-zA-Z/0-9.�\\-:#\\?\\+=_]+)?)"); Matcher matcher = pattern.matcher(remaining); if(matcher.find()) { indexLink = matcher.start(); indexLinkEnd = matcher.end(); link = remaining.substring(indexLink, indexLinkEnd); temp += convertToJsonColors(lastCode + remaining.substring(0, indexLink)) + ","; lastCode = getLastCode(lastCode + remaining.substring(0, indexLink)); String https = ""; if(ChatColor.stripColor(link).contains("https://")) https = "s"; temp += convertToJsonColors(lastCode + link, ",\"underlined\":\"" + underlineURLs() + "\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"http" + https + "://" + ChatColor.stripColor(link.replace("http://", "").replace("https://", "")) + "\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[" + convertToJsonColors(lastCode + link) + "]}}") + ","; lastCode = getLastCode(lastCode + link); remaining = remaining.substring(indexLinkEnd); } else { temp += convertToJsonColors(lastCode + remaining); break; } } while(true); return temp; }*/ public static String getLastCode(String s) { String ts = ""; char[] ch = s.toCharArray(); for(int a = 0; a < s.length() - 1; a ++) { if(String.valueOf(ch[a + 1]).matches("[lkomnLKOMN]") && ch[a] == '�') { ts += String.valueOf(ch[a]) + ch[a + 1]; a ++; } else if(String.valueOf(ch[a + 1]).matches("[0123456789abcdefrABCDEFR]") && ch[a] == '�') { ts = String.valueOf(ch[a]) + ch[a + 1]; a ++; } else if(ch[a + 1] == 'x' && ch[a] == '�') { if(ch.length > a + 13) { if(String.valueOf(ch[a + 3]).matches("[0123456789abcdefABCDEF]") && String.valueOf(ch[a + 5]).matches("[0123456789abcdefABCDEF]") && String.valueOf(ch[a + 7]).matches("[0123456789abcdefABCDEF]") && String.valueOf(ch[a + 9]).matches("[0123456789abcdefABCDEF]") && String.valueOf(ch[a + 11]).matches("[0123456789abcdefABCDEF]") && String.valueOf(ch[a + 13]).matches("[0123456789abcdefABCDEF]") && ch[a + 2] == '�' && ch[a + 4] == '�' && ch[a + 6] == '�' && ch[a + 8] == '�' && ch[a + 10] == '�' && ch[a + 12] == '�') { ts = String.valueOf(ch[a]) + ch[a + 1] + ch[a + 2] + ch[a + 3] + ch[a + 4] + ch[a + 5] + ch[a + 6] + ch[a + 7] + ch[a + 8] + ch[a + 9] + ch[a + 10] + ch[a + 11] + ch[a + 12] + ch[a + 13]; a += 13; } } } } return ts; } private static String convertToJsonColors(String s) { return convertToJsonColors(s, ""); } private static String convertToJsonColors(String s, String extensions) { String remaining = s; String temp = ""; int indexColor = -1; int indexNextColor = -1; String color = ""; String modifier = ""; boolean bold = false; boolean obfuscated = false; boolean italic = false; boolean strikethrough = false; boolean underlined = false; String previousColor = ""; int colorLength = LEGACY_COLOR_CODE_LENGTH; do { if(remaining.length() < LEGACY_COLOR_CODE_LENGTH) { temp = "{\"text\":\"" + remaining + "\"},"; break; } modifier = ""; indexColor = remaining.indexOf(BUKKIT_COLOR_CODE_PREFIX); previousColor = color; color = remaining.substring(1, indexColor + LEGACY_COLOR_CODE_LENGTH); if(color.equals(BUKKIT_HEX_COLOR_CODE_PREFIX)) { if(remaining.length() >= HEX_COLOR_CODE_LENGTH) { color = HEX_COLOR_CODE_PREFIX + remaining.substring(LEGACY_COLOR_CODE_LENGTH, indexColor + HEX_COLOR_CODE_LENGTH).replace(BUKKIT_COLOR_CODE_PREFIX, ""); colorLength = HEX_COLOR_CODE_LENGTH; bold = false; obfuscated = false; italic = false; strikethrough = false; underlined = false; } } else if(!color.matches("[0123456789abcdefABCDEF]")) { switch(color) { case "l": case "L": { bold = true; break; } case "k": case "K": { obfuscated = true; break; } case "o": case "O": { italic = true; break; } case "m": case "M": { strikethrough = true; break; } case "n": case "N": { underlined = true; break; } case "r": case "R": { bold = false; obfuscated = false; italic = false; strikethrough = false; underlined = false; color = "f"; break; } } if(!color.equals("f")) color = previousColor; if(color.length() == 0) color = "f"; } else { bold = false; obfuscated = false; italic = false; strikethrough = false; underlined = false; } if(bold) modifier += ",\"bold\":\"true\""; if(obfuscated) modifier += ",\"obfuscated\":\"true\""; if(italic) modifier += ",\"italic\":\"true\""; if(underlined) modifier += ",\"underlined\":\"true\""; if(strikethrough) modifier += ",\"strikethrough\":\"true\""; remaining = remaining.substring(colorLength); colorLength = LEGACY_COLOR_CODE_LENGTH; indexNextColor = remaining.indexOf(BUKKIT_COLOR_CODE_PREFIX); if(indexNextColor == -1) { indexNextColor = remaining.length(); } temp += "{\"text\":\"" + remaining.substring(0, indexNextColor) + "\",\"color\":\"" + hexidecimalToJsonColorRGB(color) + "\"" + modifier + extensions + "},"; remaining = remaining.substring(indexNextColor); } while(remaining.length() > 1 && indexColor != -1); if(temp.length() > 1) temp = temp.substring(0, temp.length() - 1); return temp; } private static String hexidecimalToJsonColorRGB(String c) { if(c.length() == 1) { switch(c) { case "0": return "black"; case "1": return "dark_blue"; case "2": return "dark_green"; case "3": return "dark_aqua"; case "4": return "dark_red"; case "5": return "dark_purple"; case "6": return "gold"; case "7": return "gray"; case "8": return "dark_gray"; case "9": return "blue"; case "a": case "A": return "green"; case "b": case "B": return "aqua"; case "c": case "C": return "red"; case "d": case "D": return "light_purple"; case "e": case "E": return "yellow"; case "f": case "F": return "white"; default: return "white"; } } if(isValidHexColor(c)) { return c; } return "white"; } /**public static String convertPlainTextToJson(String s, boolean convertURL) { if(convertURL) { return "[" + Format.convertLinks(s) + "]"; } else { return "[" + convertToJsonColors("�f" + s) + "]"; } } /**public static String formatModerationGUI(String json, Player player, String sender, String channelName, int hash) { if(player.hasPermission("venturechat.gui")) { json = json.substring(0, json.length() - 1); json += "," + Format.convertToJsonColors(Format.FormatStringAll(plugin.getConfig().getString("guiicon")), ",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/vchatgui " + sender + " " + channelName + " " + hash +"\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[" + Format.convertToJsonColors(Format.FormatStringAll(plugin.getConfig().getString("guitext"))) + "]}}") + "]"; } return json; }*/ /**public static PacketContainer createPacketPlayOutChat(String json) { WrappedChatComponent component = WrappedChatComponent.fromJson(json); PacketContainer container = new PacketContainer(PacketType.Play.Server.CHAT); container.getModifier().writeDefaults(); container.getChatComponents().write(0, component); return container; } public static PacketContainer createPacketPlayOutChat(WrappedChatComponent component) { PacketContainer container = new PacketContainer(PacketType.Play.Server.CHAT); container.getModifier().writeDefaults(); container.getChatComponents().write(0, component); return container; } public static void sendPacketPlayOutChat(Player player, PacketContainer packet) { try { ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet); } catch(Exception e) { e.printStackTrace(); } } public static String toPlainText(Object o, Class<?> c) { List<Object> finalList = new ArrayList<>(); StringBuilder stringbuilder = new StringBuilder(); try { splitComponents(finalList, o, c); for(Object component : finalList) { if(VersionHandler.is1_7_10()) { stringbuilder.append((String) component.getClass().getMethod("e").invoke(component)); } else { stringbuilder.append((String) component.getClass().getMethod("getText").invoke(component)); } } } catch(Exception e) { e.printStackTrace(); } if(plugin.getConfig().getString("loglevel", "info").equals("debug")) { System.out.println("my string"); System.out.println("my string"); System.out.println("my string"); System.out.println("my string"); System.out.println("my string"); System.out.println(stringbuilder.toString()); } return stringbuilder.toString(); } private static void splitComponents(List<Object> finalList, Object o, Class<?> c) throws Exception { if(plugin.getConfig().getString("loglevel", "info").equals("debug")) { for(Method m : c.getMethods()) { System.out.println(m.getName()); } } if(VersionHandler.is1_7() || VersionHandler.is1_8() || VersionHandler.is1_9() || VersionHandler.is1_10() || VersionHandler.is1_11() || VersionHandler.is1_12() || VersionHandler.is1_13() || (VersionHandler.is1_14() && !VersionHandler.is1_14_4())) { ArrayList<?> list = (ArrayList<?>) c.getMethod("a").invoke(o, new Object[0]); for(Object component : list) { ArrayList<?> innerList = (ArrayList<?>) c.getMethod("a").invoke(component, new Object[0]); if(innerList.size() > 0) { splitComponents(finalList, component, c); } else { finalList.add(component); } } } else { ArrayList<?> list = (ArrayList<?>) c.getMethod("getSiblings").invoke(o, new Object[0]); for(Object component : list) { ArrayList<?> innerList = (ArrayList<?>) c.getMethod("getSiblings").invoke(component, new Object[0]); if(innerList.size() > 0) { splitComponents(finalList, component, c); } else { finalList.add(component); } } } }*/ protected static Pattern chatHexColorPattern = Pattern.compile("(?i)&([X])"); protected static Pattern chatColorPattern = Pattern.compile("(?i)&([0-9A-F])"); protected static Pattern chatMagicPattern = Pattern.compile("(?i)&([K])"); protected static Pattern chatBoldPattern = Pattern.compile("(?i)&([L])"); protected static Pattern chatStrikethroughPattern = Pattern.compile("(?i)&([M])"); protected static Pattern chatUnderlinePattern = Pattern.compile("(?i)&([N])"); protected static Pattern chatItalicPattern = Pattern.compile("(?i)&([O])"); protected static Pattern chatResetPattern = Pattern.compile("(?i)&([R])"); public static String FormatStringColor(String string) { String allFormated = string; allFormated = chatColorPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatHexColorPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = allFormated.replaceAll("%", "\\%"); allFormated = convertHexColorCodeStringToBukkitColorCodeString(allFormated); return allFormated; } public static String FormatString(String string) { String allFormated = string; allFormated = chatMagicPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatBoldPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatStrikethroughPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatUnderlinePattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatItalicPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = chatResetPattern.matcher(allFormated).replaceAll("\u00A7$1"); allFormated = allFormated.replaceAll("%", "\\%"); return allFormated; } public static String FormatStringAll(String string) { String allFormated = Format.FormatString(string); allFormated = Format.FormatStringColor(allFormated); return allFormated; } public static String FormatPlayerName(String playerPrefix, String playerDisplayName, String playerSuffix) { playerPrefix = chatColorPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatMagicPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatBoldPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatStrikethroughPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatUnderlinePattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatItalicPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerPrefix = chatResetPattern.matcher(playerPrefix).replaceAll("\u00A7$1"); playerSuffix = chatColorPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatMagicPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatBoldPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatStrikethroughPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatUnderlinePattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatItalicPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); playerSuffix = chatResetPattern.matcher(playerSuffix).replaceAll("\u00A7$1"); return playerPrefix + playerDisplayName.trim() + playerSuffix; } /**public static String FilterChat(String msg) { int t = 0; List<String> filters = plugin.getConfig().getStringList("filters"); for(String s : filters) { t = 0; String[] pparse = new String[2]; pparse[0] = " "; pparse[1] = " "; StringTokenizer st = new StringTokenizer(s, ","); while(st.hasMoreTokens()) { if(t < 2) { pparse[t++] = st.nextToken(); } } msg = msg.replaceAll("(?i)" + pparse[0], pparse[1]); } return msg; }*/ public static boolean isValidColor(String color) { Boolean bFound = false; for(ChatColor bkColors : ChatColor.values()) { if(color.equalsIgnoreCase(bkColors.name())) { bFound = true; } } return bFound; } public static boolean isValidHexColor(String color) { Pattern pattern = Pattern.compile("(^#[0-9a-fA-F]{6}\\b)"); Matcher matcher = pattern.matcher(color); return matcher.find(); } public static String convertHexColorCodeToBukkitColorCode(String color) { StringBuilder bukkitColorCode = new StringBuilder(BUKKIT_COLOR_CODE_PREFIX + BUKKIT_HEX_COLOR_CODE_PREFIX); for(int a = 1; a < color.length(); a++) { bukkitColorCode.append(BUKKIT_COLOR_CODE_PREFIX + color.charAt(a)); } return bukkitColorCode.toString(); } public static String convertHexColorCodeStringToBukkitColorCodeString(String string) { Pattern pattern = Pattern.compile("(#[0-9a-fA-F]{6})"); Matcher matcher = pattern.matcher(string); while(matcher.find()) { int indexStart = matcher.start(); int indexEnd = matcher.end(); String hexColor = string.substring(indexStart, indexEnd); String bukkitColor = convertHexColorCodeToBukkitColorCode(hexColor); string = string.replaceAll(hexColor, bukkitColor); matcher.reset(string); } return string; } public static String escapeAllRegex(String input) { return input.replace("[", "\\[").replace("]", "\\]").replace("{", "\\{").replace("}", "\\}").replace("(", "\\(").replace(")", "\\)").replace("|", "\\|").replace("+", "\\+").replace("*", "\\*"); } /**public static boolean underlineURLs() { return plugin.getConfig().getBoolean("underlineurls", true); }*/ public static final char colorChar = '\u00a7'; //code taken from bukkit, so it can work on bungee too public static String color(String textToTranslate){ if (textToTranslate == null) return null; if (!textToTranslate.contains("&")) return textToTranslate; char[] b = textToTranslate.toCharArray(); for (int i = 0; i < b.length - 1; i++) { if ((b[i] == '&') && ("0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[(i + 1)]) > -1)){ b[i] = colorChar; b[(i + 1)] = Character.toLowerCase(b[(i + 1)]); } } return new String(b); } }
38.698925
522
0.63777
c72688d36e43b3d45b76b9b49564568807d9a113
7,689
package de.quinscape.exceed.runtime.application; import de.quinscape.exceed.model.ApplicationModel; import de.quinscape.exceed.model.annotation.InjectResource; import de.quinscape.exceed.model.annotation.ResourceInjectorPredicate; import de.quinscape.exceed.runtime.ExceedRuntimeException; import de.quinscape.exceed.runtime.resource.ResourceLoader; import de.quinscape.exceed.runtime.resource.file.PathResources; import de.quinscape.exceed.runtime.util.JSONUtil; import de.quinscape.exceed.runtime.util.RequestUtil; import jdk.nashorn.api.scripting.NashornScriptEngine; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.svenson.JSONParseException; import org.svenson.info.JSONClassInfo; import org.svenson.info.JSONPropertyInfo; import org.svenson.info.JavaObjectPropertyInfo; import javax.script.CompiledScript; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Injects the contents of exceed resources into the meta data object based on the @{@link InjectResource} annotations. */ public class ResourceInjector { private final static Logger log = LoggerFactory.getLogger(ResourceInjector.class); private final List<MetaDataResourceProperty> properties; private final Class<?> targetClass; private final Map<String, ResourceInjectorPredicate> predicates; /** * Creates a new ResourceInjector instance. * * @param targetClass Type this injector uses as target * @param predicates */ public ResourceInjector( Class<?> targetClass, Map<String, ResourceInjectorPredicate> predicates ) { this.targetClass = targetClass; this.predicates = predicates; properties = analyze(targetClass); } public List<MetaDataResourceProperty> getProperties() { return properties; } private List<MetaDataResourceProperty> analyze(Class<?> cls) { final JSONClassInfo classInfo = JSONUtil.getClassInfo(cls); List<MetaDataResourceProperty> list = new ArrayList<>(); for (JSONPropertyInfo info : classInfo.getPropertyInfos()) { final InjectResource anno = JSONUtil.findAnnotation(info, InjectResource.class); if (anno != null) { final Method setter = ((JavaObjectPropertyInfo) info).getSetterMethod(); final String beanName = anno.predicate(); final ResourceInjectorPredicate predicate; if (beanName.length() > 0) { predicate = lookup(beanName); } else { predicate = null; } list.add(new MetaDataResourceProperty(setter, anno.value(), predicate)); } } return list; } private ResourceInjectorPredicate lookup(String beanName) { final ResourceInjectorPredicate predicate = predicates.get(beanName); if (predicate == null) { throw new IllegalStateException("No ResourceInjectorPredicate with name '" + beanName + "' found among spring beans"); } return predicate; } /** * Injects the current state of all resources into the meta data object. * * @param nashorn nashorn engine * @param resourceLoader resource loader * @param target meta data * * @throws IllegalArgumentException if the given target object is not of the required type. */ public void injectResources(ApplicationModel applicationModel, NashornScriptEngine nashorn, ResourceLoader resourceLoader, Object target) { if (!target.getClass().equals(targetClass)) { throw new IllegalArgumentException("Target instance is not an instance of " + targetClass); } for (MetaDataResourceProperty property : properties) { updateResourceInternal(applicationModel, nashorn, resourceLoader, target, property); } } /** * Reinjects the resource contents for the given resource path. If the given resource path is not one of the annotated * values, this method will do nothing. * * @param nashorn nashorn * @param resourceLoader resource loader * @param target meta data * @param resourcePath resource path */ public void updateResource(ApplicationModel applicationModel, NashornScriptEngine nashorn, ResourceLoader resourceLoader, Object target, String resourcePath) { for (MetaDataResourceProperty property : properties) { if (property.resourcePath.equals(resourcePath)) { updateResourceInternal(applicationModel, nashorn, resourceLoader, target, property); return; } } } private void updateResourceInternal( ApplicationModel applicationModel, NashornScriptEngine nashorn, ResourceLoader resourceLoader, Object target, MetaDataResourceProperty property ) { if (property.predicate != null && !property.predicate.shouldInject(applicationModel)) { return; } final String resourcePath = property.resourcePath; log.debug("Updating meta data resource {}", resourcePath); try { final PathResources resourceLocation = resourceLoader.getResources(resourcePath); if (resourceLocation == null) { throw new IllegalStateException("No resources for location '" + resourcePath + "'"); } String content = new String( resourceLocation.getHighestPriorityResource().read(), RequestUtil.UTF_8 ); Class<?> type = property.setter.getParameterTypes()[0]; if (CompiledScript.class.isAssignableFrom(type)) { property.setter.invoke(target, nashorn.compile(content)); } else if (type.equals(String.class)) { property.setter.invoke(target, content); } else { try { final Object value = JSONUtil.DEFAULT_PARSER.parse(type, content); property.setter.invoke(target, value); } catch(JSONParseException e) { log.info("Ignoring invalid JSON resource change for " + resourceLocation + " contains: {}", e.getMessage()); } } } catch(Exception e) { throw new ExceedRuntimeException("Error setting resource contents via " + property.setter, e); } } /** * Meta data for @InjectResource annotated target class properties */ private static class MetaDataResourceProperty { public final Method setter; public final String resourcePath; public final ResourceInjectorPredicate predicate; private MetaDataResourceProperty( Method setter, String resourcePath, ResourceInjectorPredicate predicate ) { this.setter = setter; this.resourcePath = resourcePath; this.predicate = predicate; } @Override public String toString() { return super.toString() + ": " + "setter = " + setter + ", resourcePath = '" + resourcePath + '\'' ; } } }
32.306723
161
0.620107
cf2f54d08fc802ee517bb9b57d9373972f1c441f
6,627
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.synapse.implementation; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.ServerVulnerabilityAssessmentInner; import com.azure.resourcemanager.synapse.models.ServerVulnerabilityAssessment; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; public final class ServerVulnerabilityAssessmentImpl implements ServerVulnerabilityAssessment, ServerVulnerabilityAssessment.Definition, ServerVulnerabilityAssessment.Update { private ServerVulnerabilityAssessmentInner innerObject; private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; public String id() { return this.innerModel().id(); } public String name() { return this.innerModel().name(); } public String type() { return this.innerModel().type(); } public String storageContainerPath() { return this.innerModel().storageContainerPath(); } public String storageContainerSasKey() { return this.innerModel().storageContainerSasKey(); } public String storageAccountAccessKey() { return this.innerModel().storageAccountAccessKey(); } public VulnerabilityAssessmentRecurringScansProperties recurringScans() { return this.innerModel().recurringScans(); } public ServerVulnerabilityAssessmentInner innerModel() { return this.innerObject; } private com.azure.resourcemanager.synapse.SynapseManager manager() { return this.serviceManager; } private String resourceGroupName; private String workspaceName; private VulnerabilityAssessmentName vulnerabilityAssessmentName; public ServerVulnerabilityAssessmentImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } public ServerVulnerabilityAssessment create() { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .createOrUpdateWithResponse( resourceGroupName, workspaceName, vulnerabilityAssessmentName, this.innerModel(), Context.NONE) .getValue(); return this; } public ServerVulnerabilityAssessment create(Context context) { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .createOrUpdateWithResponse( resourceGroupName, workspaceName, vulnerabilityAssessmentName, this.innerModel(), context) .getValue(); return this; } ServerVulnerabilityAssessmentImpl( VulnerabilityAssessmentName name, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { this.innerObject = new ServerVulnerabilityAssessmentInner(); this.serviceManager = serviceManager; this.vulnerabilityAssessmentName = name; } public ServerVulnerabilityAssessmentImpl update() { return this; } public ServerVulnerabilityAssessment apply() { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .createOrUpdateWithResponse( resourceGroupName, workspaceName, vulnerabilityAssessmentName, this.innerModel(), Context.NONE) .getValue(); return this; } public ServerVulnerabilityAssessment apply(Context context) { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .createOrUpdateWithResponse( resourceGroupName, workspaceName, vulnerabilityAssessmentName, this.innerModel(), context) .getValue(); return this; } ServerVulnerabilityAssessmentImpl( ServerVulnerabilityAssessmentInner innerObject, com.azure.resourcemanager.synapse.SynapseManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); this.vulnerabilityAssessmentName = VulnerabilityAssessmentName .fromString(Utils.getValueFromIdByName(innerObject.id(), "vulnerabilityAssessments")); } public ServerVulnerabilityAssessment refresh() { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .getWithResponse(resourceGroupName, workspaceName, vulnerabilityAssessmentName, Context.NONE) .getValue(); return this; } public ServerVulnerabilityAssessment refresh(Context context) { this.innerObject = serviceManager .serviceClient() .getWorkspaceManagedSqlServerVulnerabilityAssessments() .getWithResponse(resourceGroupName, workspaceName, vulnerabilityAssessmentName, context) .getValue(); return this; } public ServerVulnerabilityAssessmentImpl withStorageContainerPath(String storageContainerPath) { this.innerModel().withStorageContainerPath(storageContainerPath); return this; } public ServerVulnerabilityAssessmentImpl withStorageContainerSasKey(String storageContainerSasKey) { this.innerModel().withStorageContainerSasKey(storageContainerSasKey); return this; } public ServerVulnerabilityAssessmentImpl withStorageAccountAccessKey(String storageAccountAccessKey) { this.innerModel().withStorageAccountAccessKey(storageAccountAccessKey); return this; } public ServerVulnerabilityAssessmentImpl withRecurringScans( VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.innerModel().withRecurringScans(recurringScans); return this; } }
37.440678
116
0.70258
219bdf80d8b2fd61b25e4ee6204cda278c4912d1
2,098
package q51; import java.util.ArrayList; import java.util.List; /** * @author admin * @date 2020/8/31 14:24 */ public class Solution { int[] rows; int[] pass; // 正对角线 int[] neg; // 反对角线 int n; List<List<String>> result = new ArrayList<>(); int[] queens; public boolean check(int row, int col) { int res = rows[col] + pass[row - col + 2 * n] + neg[row + col]; return res == 0; } public void set(int row, int col) { queens[row] = col; rows[col] = 1; pass[row - col + 2 * n] = 1; neg[row + col] = 1; } public void unset(int row, int col) { queens[row] = 0; rows[col] = 0; pass[row - col + 2 * n] = 0; neg[row + col] = 0; } public void addSolution() { List<String> solution = new ArrayList<>(); for (int i = 0; i < n; i ++) { int col = queens[i]; StringBuilder builder = new StringBuilder(); for (int j = 0; j < col; j ++) { builder.append("."); } builder.append("Q"); for (int j = 0; j < n - 1 - col; j ++) { builder.append("."); } solution.add(builder.toString()); } result.add(solution); } public void dfs(int row) { for (int col = 0; col < n; col ++) { if (check(row, col)) { set(row, col); if (row + 1 == n) { addSolution(); } else { dfs(row + 1); } unset(row, col); } } } public List<List<String>> solveNQueens(int n) { this.n = n; rows = new int[n]; pass = new int[ 4 * n - 1]; neg = new int[2 * n - 1]; queens = new int[n]; dfs(0); return result; } public static void main(String[] args) { Solution solution = new Solution(); List<List<String>> result = solution.solveNQueens(8); result.forEach(System.out::println); } }
24.682353
71
0.444709
1bbd54059af78c0e191f86b4fc1d98de1550c826
988
package top.easyblog.titan.request; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import top.easyblog.titan.enums.IdentifierType; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; /** * @author: frank.huang * @date: 2021-11-01 20:39 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class LoginRequest implements BaseRequest { /** * 登录账户类型 */ @NotNull(message = "Required parameter `identifier_type` is not present") private Integer identifierType; /** * 登录账号 */ @NotBlank(message = "Required parameter `identifier` is not present") private String identifier; /** * 账户密码 或 token */ private String credential; /** * 登录时关于用户的其他详细信息 */ private CreateSignInLogRequest extra; public boolean validate() { return IdentifierType.codeOf(identifierType) != null; } }
20.583333
77
0.69332
ce5a9c9380f98d9b97e69c18fa9116bc7fabca70
4,615
package com.ebstrada.formreturn.manager.gef.font; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.Map.Entry; import com.ebstrada.formreturn.manager.util.NoObfuscation; import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("cachedFontGroup") public class CachedFontGroup implements NoObfuscation { @XStreamAlias("cachedFontFamilies") private Map<String, CachedFontFamily> cachedFontFamilies = new HashMap<String, CachedFontFamily>(); @XStreamAlias("localizedCachedFontFamilies") private Map<String, String> localizedCachedFontFamilies = new HashMap<String, String>(); @XStreamAlias("cachedFontNames") private Map<String, String> cachedFontNames = new HashMap<String, String>(); @XStreamAlias("cachedFontPostScriptNames") private Map<String, String> cachedFontPostScriptNames = new HashMap<String, String>(); public Map<String, String> getCachedFontPostScriptNames() { return cachedFontPostScriptNames; } @XStreamAlias("cachedFontFileNames") private Map<String, String> cachedFontFileNames = new HashMap<String, String>(); public CachedFontFamily getCachedFontFamily(String familyName) { return cachedFontFamilies.get(familyName); } public void setCachedFontFamily(CachedFontFamily cachedFontFamily) { cachedFontFamilies.put(cachedFontFamily.getFamilyName(), cachedFontFamily); localizedCachedFontFamilies .put(cachedFontFamily.getLocalizedFamilyName(), cachedFontFamily.getFamilyName()); } public Map<String, CachedFontFamily> getCachedFontFamilies() { return cachedFontFamilies; } public CachedFont getCachedFont(String fontName) { String cachedFontName = cachedFontNames.get(fontName); if (cachedFontName == null) { // TRY THE POSTSCRIPT NAME (because of bug in osx) cachedFontName = cachedFontPostScriptNames.get(fontName); } CachedFontFamily cachedFontFamily = cachedFontFamilies.get(cachedFontName); if (fontName == null || cachedFontFamily == null) { return null; } CachedFont cachedFont = cachedFontFamily.getCachedFont(fontName); return cachedFont; } public CachedFont getCachedFontByFilename(String fontFileName) { return cachedFontFamilies.get(cachedFontFileNames.get(fontFileName)) .getCachedFontByFilename(fontFileName); } public CachedFont getCachedFont(int style, String family) { CachedFontFamily cachedFontFamily = cachedFontFamilies.get(family); if (cachedFontFamily == null) { return null; } CachedFont cf = cachedFontFamily.getCachedFont(style); return cf; } public void addCachedFont(CachedFont cf) { CachedFontFamily cachedFontFamily = getCachedFontFamily(cf.getFamily()); if (cachedFontFamily == null) { cachedFontFamily = new CachedFontFamily(cf.getFamily(), cf.getLocalizedFamily()); } cachedFontFamily.addCachedFont(cf); cachedFontFamilies.put(cf.getFamily(), cachedFontFamily); localizedCachedFontFamilies.put(cf.getLocalizedFamily(), cf.getFamily()); String fn = cf.getFontName(); // THIS IS NOT RETURNING THE FULL FONT NAME AS GAINED FROM THE FONT TABLE. IT IS USING THE OTHER ONE! String ff = cf.getFamily(); String psn = cf.getPostScriptName(); cachedFontNames.put(fn, ff); cachedFontPostScriptNames.put(psn, ff); cachedFontFileNames.put(cf.getFontFileName(), cf.getFamily()); } public Map<String, String> getCachedFontNames() { return cachedFontNames; } public Map<String, String> getCachedFontFileNames() { return cachedFontFileNames; } public CachedFontFamily getLocalizedCachedFontFamily(String localizedFontFamily) { String familyName = localizedCachedFontFamilies.get(localizedFontFamily); return cachedFontFamilies.get(familyName); } public CachedFont getLocalizedCachedFont(int style, String localizedFontFamily) { String fontFamily = localizedCachedFontFamilies.get(localizedFontFamily); return getCachedFont(style, fontFamily); } public String getLocalizedCachedFontFamilyName(String familyName) { for (Entry<String, String> mapping : localizedCachedFontFamilies.entrySet()) { if (mapping.getValue().equals(familyName)) { return mapping.getKey(); } } return familyName; } }
37.827869
131
0.703359
ce6e274b23c4591b5d6a73af9917978ed17368e1
14,009
package kcarlstr.assignment1; import android.app.DialogFragment; import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; /** * Created by kylecarlstrom on 15-01-16. * * Basically an overview of the claim, will list all of the different expenses and some info about them * * Copyright 2015 Kyle Carlstrom kcarlstr@ualberta.ca Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations under the License. */ public class ExpenseListActivity extends ListActivity implements DatePickerFragment.OnDataPass, ConfirmDeleteFragment.OnDataPass { public static final String EXPENSE_CLICKED_INTENT = "com.kylecarlstrom.expense_clicked_intent"; public static final String CLAIM_STATUS_INTENT = "com.kylecarlstrom.claim_status_intent"; private ArrayList<Expense> expenses; private int positionClicked; private int expenseClicked; private boolean isStartDate = false; private final SimpleDateFormat sf = new SimpleDateFormat("MMMM dd, yyyy"); private ExpenseListAdapter adapter; private TextView titleTextView; private Claim current_claim; private Button startDateButton; private Button endDateButton; private TextView claimStatusTextView; private ProgressBar claimProgress; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.expense_list_view_layout); getClaimAndExpenses(); getViews(); setDefaultView(); setListeners(); adapter = new ExpenseListAdapter(this, expenses); setListAdapter(adapter); } private void getViews() { // Get references to the widgets titleTextView = (EditText) findViewById(R.id.claim_title); claimStatusTextView = (TextView) findViewById(R.id.claim_status); startDateButton = (Button) findViewById(R.id.start_date_button); endDateButton = (Button) findViewById(R.id.end_date_button); claimProgress = (ProgressBar) findViewById(R.id.claim_progress_bar); } private void getClaimAndExpenses() { // Get the position that was clicked from the extras on the intent Bundle extras = getIntent().getExtras(); positionClicked = extras.getInt(ClaimsListActivity.CLAIM_CLICKED_INTENT); current_claim = ClaimsData.get(getApplicationContext()).getClaims().get(positionClicked); expenses = current_claim.getExpenses(); } private void setDefaultView() { // Set the default claim info if (current_claim.getClaimDescription() == null) { titleTextView.setHint("Claim description"); } else { titleTextView.setText(current_claim.getClaimDescription()); } claimStatusTextView.setText(current_claim.getProgress()); startDateButton.setText(sf.format(current_claim.getStartDate())); endDateButton.setText(sf.format(current_claim.getEndDate())); claimProgress.setProgress(0); } private void setListeners() { // Set up the listeners titleTextView.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // Intentionally blank } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { current_claim.setClaimDescription(s.toString()); } @Override public void afterTextChanged(Editable s) { // Intentionally blank } }); // Start a date picker dialog on-click startDateButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { isStartDate = true; Bundle bundle = new Bundle(); bundle.putSerializable(DatePickerFragment.DATE_FRAGMENT_INTENT, current_claim.getStartDate()); DialogFragment dateFragment = new DatePickerFragment(); dateFragment.setArguments(bundle); dateFragment.show(getFragmentManager(), "datePicker"); } }); // Start a date picker dialog on-click endDateButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { isStartDate = false; Bundle bundle = new Bundle(); bundle.putSerializable(DatePickerFragment.DATE_FRAGMENT_INTENT, current_claim.getEndDate()); DialogFragment dateFragment = new DatePickerFragment(); dateFragment.setArguments(bundle); dateFragment.show(getFragmentManager(), "datePicker"); } }); ListView lv = getListView(); // Tapping the expense in the list will go to the expense lv.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // On item click start a new activity that shows the corresponding expense Intent intent = new Intent(getBaseContext(), ExpenseEditActivity.class); intent.putExtra(ClaimsListActivity.CLAIM_CLICKED_INTENT, positionClicked); intent.putExtra(EXPENSE_CLICKED_INTENT, position); intent.putExtra(CLAIM_STATUS_INTENT, current_claim.getProgress()); startActivity(intent); } }); // Long press on item will bring up a dialog to allow you to delete the item lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { if (current_claim.getProgress().equals("Submitted") || current_claim.getProgress().equals("Approved")) { Toast.makeText(getBaseContext(), "Cannot currently delete expense items", Toast.LENGTH_SHORT).show(); return true; } ConfirmDeleteFragment dialog = new ConfirmDeleteFragment(); dialog.show(getFragmentManager(), "confirmDialog"); expenseClicked = position; return true; } }); } private void setEnabledOrNot() { // Change what is editable based on the claims progress String progress = current_claim.getProgress(); if (progress.equals("Submitted")) { titleTextView.setFocusable(false); startDateButton.setEnabled(false); endDateButton.setEnabled(false); claimProgress.setProgress(50); } else if (progress.equals("Returned")) { titleTextView.setFocusable(true); startDateButton.setEnabled(true); endDateButton.setEnabled(true); claimProgress.setProgress(0); } else if (progress.equals("Approved")) { titleTextView.setEnabled(false); startDateButton.setEnabled(false); endDateButton.setEnabled(false); claimProgress.setProgress(100); } } @Override protected void onResume() { super.onResume(); adapter.notifyDataSetChanged(); setEnabledOrNot(); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.expense_list_view_menu, menu); // Get references to each of the buttons in the menu bar MenuItem addExpenseButton = menu.findItem(R.id.expense_add_action_bar_button); MenuItem deleteClaimButton = menu.findItem(R.id.claim_delete_action_bar_button); MenuItem submitClaimButton = menu.findItem(R.id.submit_claim_action_bar_button); MenuItem returnClaimButton = menu.findItem(R.id.return_claim_action_bar_button); MenuItem approveClaimButton = menu.findItem(R.id.approve_claim_action_bar_button); // Choose which buttons show up depending on the current status of the claim String progress = current_claim.getProgress(); if (progress.equals("In Progress")) { returnClaimButton.setVisible(false); approveClaimButton.setVisible(false); } else if (progress.equals("Submitted")) { returnClaimButton.setVisible(true); approveClaimButton.setVisible(true); addExpenseButton.setVisible(false); deleteClaimButton.setVisible(false); submitClaimButton.setVisible(false); } else if (progress.equals("Returned")) { addExpenseButton.setVisible(true); deleteClaimButton.setVisible(true); returnClaimButton.setVisible(false); approveClaimButton.setVisible(false); submitClaimButton.setVisible(true); } else { returnClaimButton.setVisible(false); approveClaimButton.setVisible(false); addExpenseButton.setVisible(false); deleteClaimButton.setVisible(false); submitClaimButton.setVisible(false); } return true; } // Used to save data to a file @Override protected void onPause() { super.onPause(); ClaimsData.get(this).saveClaims(); } // Called when the user presses the "Add Expense" menu button // Creates a new expense and then passes it to a new activity so the user can edit it public void addExpense(MenuItem item) { Expense newExpense = new Expense(); current_claim.getExpenses().add(newExpense); Intent intent = new Intent(getBaseContext(), ExpenseEditActivity.class); intent.putExtra(ClaimsListActivity.CLAIM_CLICKED_INTENT, positionClicked); intent.putExtra(EXPENSE_CLICKED_INTENT, current_claim.getExpenses().size()-1); intent.putExtra(CLAIM_STATUS_INTENT, current_claim.getProgress()); startActivity(intent); } // Menu button used to submit the claim, once submitted no further edits are allowed public void submitClaim(MenuItem item) { current_claim.setProgress("Submitted"); claimStatusTextView.setText("Submitted"); titleTextView.setFocusable(false); startDateButton.setEnabled(false); endDateButton.setEnabled(false); invalidateOptionsMenu(); claimProgress.incrementProgressBy(50);;// Used to redraw the action bar } // Menu button used to return the claim, now the claim is editable again. public void returnClaim(MenuItem item) { current_claim.setProgress("Returned"); claimStatusTextView.setText("Returned"); titleTextView.setFocusableInTouchMode(true); startDateButton.setEnabled(true); endDateButton.setEnabled(true); invalidateOptionsMenu(); claimProgress.incrementProgressBy(-50);; } // Menu button used to approve the claim, one approved the claim is no longer editable public void approveClaim(MenuItem item) { current_claim.setProgress("Approved"); claimStatusTextView.setText("Approved"); titleTextView.setFocusable(false); startDateButton.setEnabled(false); endDateButton.setEnabled(false); invalidateOptionsMenu(); claimProgress.incrementProgressBy(50);; } // Deletes the claim public void deleteClaim(MenuItem item) { ClaimsData.get(getApplicationContext()).getClaims().remove(current_claim); finish(); } public void emailClaim(MenuItem item) { Intent i = new Intent(getApplicationContext(), EmailActivity.class); i.putExtra(ClaimsListActivity.CLAIM_CLICKED_INTENT, positionClicked); startActivity(i); } // Interface to pass back the data from the DatePickerDialog @Override public void onDataPass(Date data) { if (isStartDate) { current_claim.setStartDate(data); startDateButton.setText(sf.format(data)); if (current_claim.getStartDate().after(current_claim.getEndDate())) { current_claim.setEndDate(current_claim.getStartDate()); endDateButton.setText(sf.format(data)); } } else { current_claim.setEndDate(data); endDateButton.setText(sf.format(data)); if (current_claim.getEndDate().before(current_claim.getStartDate())) { current_claim.setStartDate(current_claim.getEndDate()); startDateButton.setText(sf.format(data)); } } } // Used to pass back data from the deletion confirmation dialog @Override public void onDialogPass(boolean data) { if (data) { expenses.remove(expenseClicked); } adapter.notifyDataSetChanged(); } }
41.324484
118
0.660861
2273ba191e6f260090dc931d2c8ceb38d8820b6d
2,959
package awe.idea.com.admin.controller; import awe.idea.com.common.utils.Constant; import awe.idea.com.common.utils.PageUtils; import awe.idea.com.common.utils.Query; import awe.idea.com.common.utils.R; import awe.idea.com.common.validators.ValidatorUtils; import awe.idea.com.service.constants.Constants; import awe.idea.com.service.entity.SysRoleEntity; import awe.idea.com.service.service.SysRoleMenuService; import awe.idea.com.service.service.SysRoleService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 角色 * * @author Ivan * @email xxx@qq.com * @date 2020-10-09 11:51:32 */ @RestController @RequestMapping("sys/role") public class SysRoleController extends AbstractController { @Autowired private SysRoleService sysRoleService; @Autowired private SysRoleMenuService sysRoleMenuService; /** * 列表 */ @RequestMapping("/list") @RequiresPermissions("sysrole:list") public R list(@RequestParam Map<String, Object> params){ //查询列表数据 Query query = new Query(params); List<SysRoleEntity> sysRoleList = sysRoleService.queryList(query); int total = sysRoleService.queryTotal(query); PageUtils pageUtil = new PageUtils(sysRoleList, total, query.getLimit(), query.getPage()); return R.ok().put("page", pageUtil); } /** * 角色列表 */ @RequestMapping("/select") @RequiresPermissions("sysrole:info") public R select(){ Map<String, Object> map = new HashMap<>(); //如果不是超级管理员,则只查询自己所拥有的角色列表 if(getUserId() != Constants.SUPER_ADMIN){ map.put("createUserId", getUserId()); } List<SysRoleEntity> list = sysRoleService.queryList(map); return R.ok().put("list", list); } /** * 信息 */ @RequestMapping("/info/{roleId}") @RequiresPermissions("sysrole:info") public R info(@PathVariable("roleId") Long roleId){ SysRoleEntity sysRole = sysRoleService.queryObject(roleId); //查询角色对应的菜单 List<Long> menuIdList = sysRoleMenuService.queryMenuIdList(roleId); sysRole.setMenuIdList(menuIdList); return R.ok().put("role", sysRole); } /** * 保存 */ @RequestMapping("/save") @RequiresPermissions("sysrole:save") public R save(@RequestBody SysRoleEntity sysRole) { ValidatorUtils.validateEntity(sysRole); sysRole.setCreateUserId(getUserId()); sysRoleService.save(sysRole); return R.ok(); } /** * 修改 */ @RequestMapping("/update") @RequiresPermissions("sysrole:update") public R update(@RequestBody SysRoleEntity sysRole) { ValidatorUtils.validateEntity(sysRole); sysRole.setCreateUserId(getUserId()); sysRoleService.update(sysRole); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") @RequiresPermissions("sysrole:delete") public R delete(@RequestBody Long[] roleIds){ sysRoleService.deleteBatch(roleIds); return R.ok(); } }
23.862903
92
0.7293
75d7f67c545df923cfb71a9498cae3fe24f76178
2,270
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sp_dz1; import java.util.LinkedList; import java.util.List; /** * * @author MB */ public class TableDirective {//tabela direktiva class Zapis { private String nameSeg; private int base, len; private String desc; public Zapis(String nameSeg, int base, int len, String desc) { this.nameSeg = nameSeg; this.base = base; this.len = len; this.desc = desc; } public void setBase(int base) { this.base = base; } public void setLen(int len) { this.len = len; } public int getBase() { return base; } public String getDesc() { return desc; } public int getLen() { return len; } public String getNameSeg() { return nameSeg; } } private List<Zapis> listZapis; public TableDirective() { listZapis = new LinkedList<Zapis>(); addItems(); } private void addItems() { listZapis.add(new Zapis(".text", 0, 0, "RP")); listZapis.add(new Zapis(".bss", 0, 0, "RW")); listZapis.add(new Zapis(".data", 0, 0, "RWP")); } public List<Zapis> getListZapis() { return listZapis; } @Override public String toString() { String res = "TableDirective:\n"; for (int i = 0; i < listZapis.size(); i++) { if (listZapis.get(i).getBase() != listZapis.get(i).getLen()) { res += (listZapis.get(i).getNameSeg() + "\t" + listZapis.get(i).getBase() + "\t" + listZapis.get(i).getLen() + "\t" + listZapis.get(i).getDesc() + "\n"); } } return res; } public String getZapisString(int index){ return ("\t\t" + listZapis.get(index).getNameSeg() + "\t" + listZapis.get(index).getBase() + "\t" + listZapis.get(index).getLen() + "\t" + listZapis.get(index).getDesc() + "\n"); } public boolean isDefined(int index){ return listZapis.get(index).getBase() != listZapis.get(index).getLen(); } }
24.408602
105
0.521145
ac5313db539072b733c63ffc427a7eb29adebd3d
357
package org.javalite.activeweb; /** * Indicates a service in Guice can be destroyed when the application shuts down. * Implement by service classes that are injected into the Guice container. * * @author Igor Polevoy */ public interface Destroyable { /** * Will be called when your app is shut down gracefully. */ void destroy(); }
22.3125
81
0.70028
e5bbca4a29a2ac24a01b44ab21b582eab66fe204
2,544
/** * */ package domain; import burlap.oomdp.core.Domain; import burlap.oomdp.core.PropositionalFunction; import burlap.oomdp.core.objects.ObjectInstance; import burlap.oomdp.core.states.State; /** * @author Felipe Leno da Silva * Propositional function for "touch" relations. Can identify if an agent is adjacent to a wall. */ public class TouchPF extends PropositionalFunction { protected String direction; protected static String[] parameters = {GoldMineConstants.CLS_AGENT,GoldMineConstants.CLS_WALL}; /** * Constructor for a "touch" Propositional function. * @param domain domain * @param name name for the PF * @param direction direction for the touch relation. Example: GoldMineConstants.NORTH for touchN relation. */ public TouchPF(Domain domain,String name, String direction) { super(name, domain, parameters); this.direction = direction; } /* (non-Javadoc) * @see burlap.oomdp.core.PropositionalFunction#isTrue(burlap.oomdp.core.states.State, java.lang.String[]) */ @Override public boolean isTrue(State s, String[] params) { ObjectInstance miner = s.getObject(params[0]); ObjectInstance wall = s.getObject(params[1]); int ax = miner.getIntValForAttribute(GoldMineConstants.ATT_X); int ay = miner.getIntValForAttribute(GoldMineConstants.ATT_Y); int wx = wall.getIntValForAttribute(GoldMineConstants.ATT_X); int wy = wall.getIntValForAttribute(GoldMineConstants.ATT_Y); String wallDir = wall.getStringValForAttribute(GoldMineConstants.ATT_POSITION); //First check if the wall is in the same position as the miner. If so, the proposition is true if the wall is in the same //direction as the touch relation if(ax==wx && ay==wy) if(wallDir.equals(this.direction)) return true; else return false; //In case the wall is not in the same position, check if the wall is in another position but prevent miner movement String testWallDirection=null; int deltaX=0; int deltaY=0; switch(this.direction){ case GoldMineConstants.NORTH: testWallDirection = GoldMineConstants.SOUTH; deltaY = +1; break; case GoldMineConstants.SOUTH: testWallDirection = GoldMineConstants.NORTH; deltaY = -1; break; case GoldMineConstants.EAST: testWallDirection = GoldMineConstants.WEST; deltaX = +1; break; case GoldMineConstants.WEST: testWallDirection = GoldMineConstants.EAST; deltaX = -1; break; } // if(ax+deltaX == wx && ay+deltaY == wy && testWallDirection.equals(wallDir)) return true; return false; } }
28.58427
123
0.737814
f542f694e6e4c8173053e686d9a9a2d383802e9e
3,276
package com.ruoyi.system.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import java.util.Date; /** * 物流单号和L关联对象 waybill_l_rel * * @author ruoyi * @date 2022-04-15 */ public class WaybillLRel extends BaseEntity { private static final long serialVersionUID = 1L; /** 物流单号 */ @Excel(name = "物流单号") private String waybill; /** 状态 */ @Excel(name = "状态") private String status; /** 回退时间 */ @Excel(name = "回退时间") private String backDate; /** 物流单号L */ @Excel(name = "物流单号L") private String waybillL; /** 创建人 */ @Excel(name = "创建人") private String createUser; /** 更新人 */ @Excel(name = "更新人") private String updateUser; /** 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") private Date createdTime; /** 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") private Date updatedTime; /** 是否删除 */ @Excel(name = "是否删除") private Integer isDelete; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getBackDate() { return backDate; } public void setBackDate(String backDate) { this.backDate = backDate; } public void setWaybill(String waybill) { this.waybill = waybill; } public String getWaybill() { return waybill; } public void setWaybillL(String waybillL) { this.waybillL = waybillL; } public String getWaybillL() { return waybillL; } public void setCreateUser(String createUser) { this.createUser = createUser; } public String getCreateUser() { return createUser; } public void setUpdateUser(String updateUser) { this.updateUser = updateUser; } public String getUpdateUser() { return updateUser; } public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } public Date getCreatedTime() { return createdTime; } public void setUpdatedTime(Date updatedTime) { this.updatedTime = updatedTime; } public Date getUpdatedTime() { return updatedTime; } public void setIsDelete(Integer isDelete) { this.isDelete = isDelete; } public Integer getIsDelete() { return isDelete; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("waybill", getWaybill()) .append("waybillL", getWaybillL()) .append("createUser", getCreateUser()) .append("updateUser", getUpdateUser()) .append("createdTime", getCreatedTime()) .append("updatedTime", getUpdatedTime()) .append("isDelete", getIsDelete()) .toString(); } }
21.552632
71
0.603175
b0a631c9973f60f26e83dab454432cb7b7a2eb8f
11,927
package com.tami.vmanager.http; /** * Created by why on 2018/6/23. */ public class HttpKey { //用户名和密码登录 public static final String USER_LOGIN = "user/login"; //手机号和验证码登录 public static final String USER_LOGIN_SMS = "user/loginSms"; // 绑定用户RegistrationId public static final String USER_REGISTRATION_ID = "user/setUserRegistrationId"; //请求发送验证码 public static final String USER_SEND_VERIFY_CODE_LOGIN = "sms/sendVerifyCodeLogin"; //找回密码的验证码 public static final String USER_SEND_VERIFY_CODE = "sms/sendVerifyCode"; //注销登录 public static final String USER_LOGIN_OUT = "user/loginOut"; // 更改密码 public static final String USER_CHANGE_PASSWORD = "user/changePassWord"; // 重置密码 public static final String USER_RESET_PASSOWRD = "user/resetPwd"; //提醒消息设置 public static final String USER_NOTICE_CONFIG = "user/setUserNoticeConfig"; //获取提醒消息 public static final String USER_GET_NOTICE_CONFIG = "user/getUserNoticeConfig"; //修改用户头像 public static final String USER_UPDATE_USER_ICON = "user/updateUserIcon"; // 首页顶部数据 public static final String USER_GET_BANNER_DATA = "meeting/getBannerData"; // 首页下面数据 public static final String USER_GET_INDEX = "meeting/getIndex"; // 查询全部会议列表searchType类型1:所有,2:待付款,3:待完善,4:今天,5:本月,6:本年度 public static final String USER_ALL_MEETINGS = "meeting/allMeetings"; // 查询今日会议列表 public static final String TODAY_MEETINGS = "meeting/todayMeetings"; // 查询我关注的会议列表searchType1:全部,2:今天,3:一周,4:一个月 public static final String FOLLOW_MEETINGS = "meeting/followMeetings"; // 查询待办会议列表 public static final String WAIT_MEETINGS = "meeting/waitMeetings"; // 关注某一个会议 public static final String FOLLOW_USER_MEETING = "meeting/followUserMeeting"; // 取消关注某一个会议 public static final String CANCEL_USER_MEETING = "meeting/cancelUserMeeting"; //添加VIP成员信息 public static final String CREATE_VIPGUEST = "vip/createVipGuest"; //获取所有职位及职位下的人员列表 public static final String USER_LIST_OF_POSITION = "user/userListOfPosition"; // App创建会议 public static final String CREATE_MEETING = "meeting/createMeeting"; // 根据酒店ID查询会议厅List public static final String GET_MEETING_ADDRESS_LIST = "meeting/getMeetingAddressList"; // 查询系统内置的会议流程所有节点 public static final String GET_MEETING_ITEMS = "meeting/getMeetingItems"; // 图片上传 public static final String UPLOAD_IMAGE = "upload/uploadImage"; //搜索会议 public static final String SEARCH_MEETING = "meeting/searchMeetingPage"; //获取反馈信息列表 public static final String FEED_BACK = "chat/feedBackPage"; //分页查询公告列表 public static final String GET_NOTICE_LIST = "notice/noticePage"; //查询会议概览信息/查看EO单 public static final String GET_MEETING = "meeting/getMeeting"; //根据会议ID查询会议节点信息 public static final String GET_MEETING_ITEMS_BY_MEETING_ID = "meeting/getMeetingItemsByMeetingId"; // 综合分数 public static final String GET_AVG = "meetingEvaluate/getAvg"; // 意见箱 评价列表 public static final String GET_EVALUATEPAGE_LIST = "meetingEvaluate/evaluatePage"; // VIP详情 public static final String VIP_DETAIL = "vip/vipGusetPage"; //创建公告 public static final String CREATE_NOTICE = "notice/createNotice"; //获取会议群组中的用户成员 public static final String MEETING_USER_GROUP_PAGE = "group/meetingUserGroupPage"; //群消息列表 public static final String GET_MEETING_GROUP_CHAT = "chat/meetingChatPage"; //发送群消息 public static final String SEND_CHAT_MSG = "chat/sendMsg"; // 查询我创建的会议列表 public static final String MY_MEETINGS = "meeting/myMeetings"; // 获取会议流程单 public static final String GET_MEETING_ITEM_FLOW = "meeting/getMeetingItemFlow"; // 获取会议流程单 public static final String DELETE_USER_MEETING = "meeting/deleteUserMeeting"; // 获取流程天数 public static final String GET_MEETING_DAYS = "meeting/getMeetingDays"; //获取需求变化(活动变化)分页数据 public static final String GET_MEETING_REQUIREMENT_PAGE = "meeting/meetingRequirementPage"; // 回复会议变化(活动变化)需求 public static final String REPLY_MEETING_REQUIREMENT = "meeting/replyMeetingRequirement"; // 系统内置角色List public static final String GET_SYSTEM_ROLE_LIST = "user/getSystemRoleList"; // 创建自定义流程节点 public static final String CREATE_USER_MEETING_ITEM = "meeting/createUserMeetingItem"; // 添加( 编辑)会议流程节点 public static final String SET_MEETING_ITEMS = "meeting/setMeetingItems"; // 修改会议信息 public static final String UPDATE_MEETING = "meeting/updataMeeting"; // 获取会议签到人员信息接口 人员名单 public static final String GET_ACTUALLIST = "meeting/getActualList"; // 主办方成员列表(来源于VZH) public static final String GET_SPONSOR_USER_LIST = "meeting/getSponsorUserList"; // 验证用户是否已被分配了某节点权限 public static final String IS_CAN_OPERATION = "meeting/isCanOperation"; //会议流程节点分配人员 public static final String SET_MEETING_ITEM_USER = "meeting/setMeetingItemsUser"; //获取会议流程节点已分配人员 public static final String GET_SELECT_MEETING_ITEMS_USER = "meeting/getSelectMeetingItemsUser"; //获取全部部门用户组 public static final String GET_USER_IN_DEPARTMENT = "user/getUserInDepartment"; //获取部门用户组 public static final String GET_USER_DEPARTMENT = "user/getUserDepartment "; //获取会议实到人数(来源于VZH) public static final String GET_ACTUAL_NUM = "meeting/getActualNum"; //判断用户是否有添加会议节点用户的权限 public static final String CHECK_ADD_MEETING_ITEM_USER = "meeting/checkAddMeetingItemUser"; //会议流程节点删除人员操作权限 public static final String DELETE_MEETING_ITEMS_USER = "meeting/deleteMeetingItemsUser"; //会议流程节点删除人员操作权限 public static final String SET_MEETING_ITEMS_STATUS = "meeting/setMeetingItemsStatus"; //版本更新 public static final String UPDATE = "upgrade/getUpgrade"; //添加用户到会议分组(进群) public static final String INTOGROUPUSER = "group/IntoGroupUser"; //从会议分组中删除用户(退群) public static final String OUTGROUPUSER = "group/outGroupUser"; //校验用户是否在群中 public static final String CHECKGROUPUSER = "group/checkGroupUser"; //获取创建会议人的Id public static final String GETMEETINGSELL_USERID = "meeting/getMeetingSellUserId "; //清除极光registrationId public static final String longOutForRegistrationId = "user/longOutForRegistrationId "; //--------------------------------------------------------------------------- // //手机号 // public static final String KEY_MOBILE = "mobile "; // //用户ID // public static final String KEY_USER_ID = "userId"; // //回调极光函数得到的RegistrationId // public static final String KEY_REGISTRATION_ID = "registrationId"; // //密码 // public static final String KEY_PASSWORD = "passWord"; // //旧密码 // public static final String KEY_OLD_PASSWORD = "oldPassWord"; // //新密码 // public static final String KEY_NEW_PASSWORD = "newPassWord"; // //短信验证码 // public static final String KEY_SMS_CODE = "smsCode"; // //机构ID // public static final String KEY_SYSTEM_ID = "systemId"; // //系统消息 1 开启 0 未开启 以下设置同理 // public static final String KEY_SYSTEM_NOTICE = "systemNotice"; // //主办方消息 // public static final String KEY_HOST_NOTICE = "hostNotice"; // //会务广播 // public static final String KEY_MEETING_NOTICE = "meetingNotice"; // //满意度通知 // public static final String KEY_SATIS_FACTION_NOTICE = "satisfactionNotice"; // //群聊通知 // public static final String KEY_GROUP_CHAT_NOTICE = "groupChatNotice"; // //头像地址 // public static final String KEY_ICON_URL = "iconUrl"; // //会议名称 // public static final String KEY_MEETING_NAME = "meetingName"; // //会议创建者ID // public static final String KEY_CREATE_MEETING_URER_ID = "createMeetingUserId"; // //会议厅ID // public static final String KEY_MEETING_ADDRESS_ID = "meetingAddressId"; // //开始时间 // public static final String KEY_START_DATE = "startDate"; // //结束时间 // public static final String KEY_END_DATE = "endDate"; // //合同金额 // public static final String KEY_CONTRACT_MONEY = "contractMoney"; // //已付金额 // public static final String KEY_PAY_MONEY = "payMoney"; // //预计人数 // public static final String KEY_ESTIMATE_NUM = "estimateNum"; // //保底人数 // public static final String KEY_MIN_NUM = "minNum"; // //主办方名称 // public static final String KEY_SPONSOR_NAME = "sponsorName"; // //VIP等级 0 ,1,2,3,4 // public static final String KEY_IS_IMPORTANT = "isImportant"; // //接待人员ID集合 "1,2,3" // public static final String KEY_VIP_RECEIVE_USER_ID = "vipReceiveUserId"; // //EO单地址 // public static final String KEY_EO_URL = "eoUrl"; // //是否V智会 0不是 1是 // public static final String KEY_IS_VZH = "isVzh"; // //VIP参会人员LIST[{"name":"",“intro”:""},{"name":"",“intro”:""}] // public static final String KEY_VIP_LIST = "vipList"; // //会议ID // public static final String KEY_MEETING_ID = "meetingId"; // //VIP嘉宾姓名 // public static final String KEY_NAME = "name"; // //VIP嘉宾介绍 // public static final String KEY_INTRO = "intro"; // //当前页 // public static final String KEY_CURPAGE = "curPage"; // //每页条数 // public static final String KEY_PAGE_SIZE = "pageSize"; // // 类别 参数固定为0,1,2 【 0-今天 1-本月 2-本年】 // public static final String KEY_TYPE = "type"; // // 类型 1:全部,2:今天,3:一周,4:一个月 //如果是会意意见箱类别 2-举办方 3-参会方 // public static final String KEY_SEARCH_TYPE = "searchType"; // // 会议举办时间 年月日,格式如 2018-05-21 // public static final String KEY_START_ON = "startOn"; // // 流程节点ID,开始时间集合 json字符串 格式参考说明 // public static final String KEY_MEETING_ITEMS_JSON = "meetingItemsJson"; // // 流程节点ID // public static final String KEY_MEETING_ITEM_SET_ID = "meetingItemSetId"; // // 设置的状态值 1代表通过 2代表有问题 3代表正常状态(灰色) // public static final String KEY_STATUS = "status"; // // 节点有问题时的备注 // public static final String KEY_MARK = "mark"; // // 需求方人员ID // public static final String KEY_REQUEST_USER_ID = "requestUserId"; // // 内容 // public static final String KEY_REQUEST_CONTENT = "requestContent"; // // 发布人姓名 // public static final String KEY_REQUEST_USER_NAME = "requestUserName"; // // 发布人头像 // public static final String KEY_REQUEST_ICON_URL = "requestIconUrl"; // // 需求变化 ID // public static final String KEY_MEETING_REQUIREMENT_ID = "MeetingRequirementId"; // // 回复人ID // public static final String KEY_REPLY_USER_ID= "replyUserId"; // // 回复内容 // public static final String KEY_REPLY_CONTENT= "replyContent"; // // 评价内容 // public static final String KEY_CONTENT= "content"; // // 分数 5 // public static final String KEY_SCORE= "score"; // // 评论人真实姓名 // public static final String KEY_USER_NAME= "userName"; // // 评论ID // public static final String KEY_ID= "id"; // // 群组类型 1-V管家 2-V智会 3-VV群 // public static final String KEY_GROUP_TYPE= "groupType"; // // 公告类型 0-全部 1-系统通知 2-会务广播 3-群内公告 // public static final String KEY_NOTICE_TYPE= "noticeType"; // // 公告标题 // public static final String KEY_TITLE= "title"; // // 是否置顶 0 正常 1 置顶 // public static final String KEY_IS_TOP= "isTop"; // //公告ID // public static final String KEY_NOTICE_ID= "noticeId"; // //用户头像(当群消息来自v智会 或者 来自vv群时需传userIcon) // public static final String KEY_USER_ICON= "userIcon"; // //从哪里发送 1-v管家 2-v智会 3-VV群 // public static final String KEY_FROM_TYPE= "fromType"; // //发送到哪里 1-v管家 2-v智会 3-VV群 // public static final String KEY_TO_TYPE= "toType"; }
45.007547
102
0.675778
518fe9e13f55b80051ab90d1265aaf8766028b6f
1,918
package net.foreworld.oauth2.authorize.core.aop; import java.util.HashMap; import java.util.Map; import javax.annotation.Resource; import org.apache.shiro.authc.CredentialsException; import org.apache.shiro.authc.DisabledAccountException; import org.apache.shiro.authc.UnknownAccountException; import org.springframework.context.support.MessageSourceAccessor; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; /** * * @author huangxin <3203317@qq.com> * */ @ControllerAdvice public class LoginExceptionHandler { @Resource private MessageSourceAccessor msa; /** * * @param e * @param model * @return */ @ResponseBody @ExceptionHandler(CredentialsException.class) public Map<String, Object> credentials(CredentialsException e, Model model) { model.addAttribute("tips", msa.getMessage("err_login")); Map<String, Object> result = new HashMap<String, Object>(); result.put("success", false); result.put("msg", msa.getMessage("err_login")); return result; } /** * * @param e * @param model * @return */ @ResponseBody @ExceptionHandler(DisabledAccountException.class) public Map<String, Object> disabledAccount(DisabledAccountException e, Model model) { Map<String, Object> result = new HashMap<String, Object>(); result.put("success", false); result.put("msg", "DisabledAccountException"); return result; } /** * * @param e * @param model * @return */ @ResponseBody @ExceptionHandler(UnknownAccountException.class) public Map<String, Object> unknownAccount(UnknownAccountException e, Model model) { Map<String, Object> result = new HashMap<String, Object>(); result.put("success", false); result.put("msg", "UnknownAccountException"); return result; } }
24.909091
78
0.74609
32c94444a013d9dfc59f739f9d9ea9b4a3a35d9e
2,050
package com.app.framework.utils; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.text.TextUtils; import java.util.ArrayList; import java.util.List; /** * Created by lowen on 14/08/2017 21:42 */ public final class ManifestParser<T> { private final Context context; private String moduleName; public ManifestParser(Context context) { this.context = context; } public T parse(String moduleName) { this.moduleName = moduleName; try { ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo( context.getPackageName(), PackageManager.GET_META_DATA); String packageName = appInfo.metaData.getString(moduleName); if (TextUtils.isEmpty(packageName)) { throw new RuntimeException("Unable to find metadata name:" + moduleName + "."); } return parseModule(packageName); } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Unable to find metadata to parse " + moduleName, e); } catch (ClassCastException e) { throw new RuntimeException("Expected instanceof ," + moduleName + "."); } } private T parseModule(String className) throws ClassCastException { Class clazz; try { clazz = Class.forName(className); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Unable to find ConfigModule implementation", e); } Object module; try { module = clazz.newInstance(); } catch (InstantiationException e) { throw new RuntimeException("Unable to instantiate " + moduleName + " implementation for " + clazz, e); } catch (IllegalAccessException e) { throw new RuntimeException("Unable to instantiate " + moduleName + " implementation for " + clazz, e); } return (T) module; } }
35.344828
114
0.643902
586b0b843a3082b5d3a6143a9e78b5f833f1242c
11,670
/* * Copyright 2017 Swedish E-identification Board (E-legitimationsnämnden) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package se.tillvaxtverket.tsltrust.weblogic.models; import com.aaasec.lib.aaacert.AaaCertificate; import se.tillvaxtverket.tsltrust.common.jsonobjects.DiscoveryData.DisplayNameData; import se.tillvaxtverket.tsltrust.common.utils.core.DerefUrl; import se.tillvaxtverket.tsltrust.common.utils.general.FileOps; import se.tillvaxtverket.tsltrust.weblogic.db.AuthDbUtil; import se.tillvaxtverket.tsltrust.weblogic.db.LogDbUtil; import se.tillvaxtverket.tsltrust.weblogic.db.TslCertDb; import se.tillvaxtverket.tsltrust.weblogic.db.TslCertDbSqlite; import se.tillvaxtverket.tsltrust.weblogic.content.TTConstants; import se.tillvaxtverket.tsltrust.weblogic.db.ValPoliciesDbUtil; import java.io.File; import java.net.URL; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Random; import java.util.logging.Logger; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; import se.tillvaxtverket.tsltrust.common.config.ConfigData; import se.tillvaxtverket.tsltrust.common.jsonobjects.DiscoveryData; import se.tillvaxtverket.tsltrust.common.jsonobjects.RequestPassword; /* * This model class holds data and objects that are used as application resources * resources found in objects of this class is common to all users and sessions. * Typical data hold by this class is information about Trust Sercice Lists, * information about identity providers and database resources. */ public class TslTrustModel implements TTConstants { private static final Logger LOG = Logger.getLogger(TslTrustModel.class.getName()); private TslCertDb tslCertDb; private AuthDbUtil authDb; private LogDbUtil logDb; private ValPoliciesDbUtil policyDb; private String mode, dataLocation; private int tslRefreshDelay; private List<AaaCertificate> lotlSigCerts; private boolean validLotl = true; private Gson gson = new Gson(); private List<DiscoveryData> discoData; private String discoFeedUrl; private static Type discoDataType = new TypeToken<List<DiscoveryData>>() { }.getType(); private ConfigData conf; private String lotlUrl; public TslTrustModel(ConfigData conf, String dataLocation, String mode, String tSLrecacheTime, String maxConsoleLogSize,String maxMajorLogAge, String lotlUrl, String discoFeedUrl ) { int tslRefreshDelay; try { tslRefreshDelay = Integer.parseInt(tSLrecacheTime) * 1000 * 60 * 60; } catch (Exception ex) { tslRefreshDelay = 1000 * 60 * 60 * 24; } this.mode = mode; this.dataLocation = dataLocation; this.tslRefreshDelay = tslRefreshDelay; this.discoFeedUrl = discoFeedUrl; this.lotlUrl = lotlUrl; this.conf = conf; tslCertDb = new TslCertDbSqlite(dataLocation); authDb = new AuthDbUtil(dataLocation); logDb = new LogDbUtil(maxConsoleLogSize, maxMajorLogAge); policyDb = new ValPoliciesDbUtil(); loadDiscoFeed(); } public ConfigData getConf() { return conf; } public void setConf(ConfigData conf) { this.conf = conf; } public AuthDbUtil getAuthDb() { return authDb; } public String getDataLocation() { return dataLocation; } public String getMode() { return mode; } public TslCertDb getTslCertDb() { return tslCertDb; } public LogDbUtil getLogDb() { return logDb; } public ValPoliciesDbUtil getPolicyDb() { return policyDb; } /** * Time between server updates with regard to TSL re-cache and policy * certificate updates * * @return Number of milliseconds between server updates */ public int getTslRefreshDelay() { return tslRefreshDelay; } public List<AaaCertificate> getLotlSigCerts() { return lotlSigCerts; } public void setLotlSigCerts(List<AaaCertificate> lotlSigCert) { this.lotlSigCerts = lotlSigCert; } public boolean isValidLotl() { return validLotl; } public void setValidLotl(boolean validLotl) { this.validLotl = validLotl; } public String getLotlUrl() { return lotlUrl; } private void loadDiscoFeed() { if (discoFeedUrl == null || discoFeedUrl.length() == 0) { return; } try { URL url = new URL(discoFeedUrl); String jsonData = stripJsonp(DerefUrl.getData(url)); discoData = gson.fromJson(jsonData, discoDataType); } catch (Exception ex) { return; } } public String getTempDataLocation() { return dataLocation + "TempFiles/"; } public Map<String, String> getIdpDisplayNames() { return getIdpDisplayNames(Locale.ENGLISH); } public Map<String, String> getIdpDisplayNames(Locale locale) { Map<String, String> idpDisplayNames = new HashMap<String, String>(); if (discoData == null) { return idpDisplayNames; } for (DiscoveryData dData : discoData) { try { String entityId = dData.EntityID; if (dData.EntityID.length() > 0) { String dispName = getDisplayName(dData.DisplayNames, entityId, locale); idpDisplayNames.put(entityId, dispName); } } catch (Exception ex) { LOG.warning(ex.getMessage()); } } return idpDisplayNames; } private String stripJsonp(String jsonp) { if (jsonp == null || jsonp.length() < 2) { return ""; } String inp = jsonp.trim(); int first = inp.indexOf("("); int last = inp.lastIndexOf(")"); //If string ends with ) if (last == inp.length() - 1) { if (first == -1 || first > last) { //Illegal json and jsonp return ""; } //Strinp callback return inp.substring(first + 1, last); } //String was not jsonp, return original return inp; } private String getDisplayName(List<DiscoveryData.DisplayNameData> dispNames, String entityId, Locale locale) { if (dispNames == null) { return (entityId == null) ? "" : entityId; } String locDispName = ""; String defDispName = ""; String langCode = locale.getLanguage(); for (DisplayNameData dnData : dispNames) { try { if (dnData.lang.equalsIgnoreCase(langCode)) { locDispName = dnData.value; } if (dnData.lang.equalsIgnoreCase("en")) { defDispName = dnData.value; } } catch (Exception ex) { return entityId; } } if (locDispName.length() > 0) { return locDispName; } if (defDispName.length() > 0) { return defDispName; } return entityId; } public List<String> getCurrentRequestPassword() { List<RequestPassword> reqPassList = new ArrayList<RequestPassword>(); long currentTime = System.currentTimeMillis(); long minVal = 1000 * 60 * 60 * 24 * 2; // 2 days validity is minimum, else a new pw is created long maxVal = 1000 * 60 * 60 * 24 * 3; // New pw is created with 3 days validity List<String> currentPassw = new ArrayList<String>(); File reqPwFile = new File(FileOps.getfileNameString(dataLocation, "cfg"), "rplist"); if (!reqPwFile.canRead()) { reqPwFile.getParentFile().mkdirs(); } long recentExp = 0; String recentPw = ""; try { String jsonData = FileOps.readTextFile(reqPwFile); reqPassList = gson.fromJson(jsonData, new TypeToken<List<RequestPassword>>() { }.getType()); for (int i = reqPassList.size() - 1; i >= 0; i--) { RequestPassword rp = reqPassList.get(i); try { if (rp.exp < currentTime) { reqPassList.remove(i); continue; } if (rp.exp > recentExp) { recentExp = rp.exp; recentPw = rp.rp; } } catch (Exception ex) { reqPassList.remove(i); } } } catch (Exception ex) { reqPassList = new ArrayList<RequestPassword>(); } if (recentExp < (currentTime + minVal)) { String pw = getNewPW(); RequestPassword rp = new RequestPassword(); rp.rp = pw; rp.exp = currentTime + maxVal; reqPassList.add(rp); currentPassw.add(pw); currentPassw.add(TIME_FORMAT.format(new Date(currentTime + maxVal))); } else { currentPassw.add(recentPw); currentPassw.add(TIME_FORMAT.format(new Date(recentExp))); } FileOps.saveTxtFile(reqPwFile, gson.toJson(reqPassList)); return currentPassw; } public boolean checkRequestPw(String inpPwd) { List<RequestPassword> reqPassList = new ArrayList<RequestPassword>(); long currentTime = System.currentTimeMillis(); File reqPwFile = new File(dataLocation + "cfg/rplist"); if (!reqPwFile.canRead()) { return false; } try { String jsonData = FileOps.readTextFile(reqPwFile); reqPassList = gson.fromJson(jsonData, new TypeToken<List<RequestPassword>>() { }.getType()); } catch (Exception ex) { } for (int i = reqPassList.size() - 1; i >= 0; i--) { RequestPassword rp = reqPassList.get(i); try { if (rp.rp.equals(inpPwd)) { if (rp.exp > currentTime) { return true; } } } catch (Exception ex) { } } return false; } private String getNewPW() { char[] symbols = new char[36]; for (int idx = 0; idx < 10; ++idx) { symbols[idx] = (char) ('0' + idx); } for (int idx = 10; idx < 36; ++idx) { symbols[idx] = (char) ('a' + idx - 10); } Random random = new Random(System.currentTimeMillis()); char[] buf; int length = 8; buf = new char[length]; for (int idx = 0; idx < buf.length; ++idx) { buf[idx] = symbols[random.nextInt(symbols.length)]; } return new String(buf); } }
33.05949
186
0.596315
f347643ea438da23a42cf1b1822efa104edade7d
3,210
package com.p4square.ccbapi; import com.p4square.ccbapi.exception.CCBParseException; import com.p4square.ccbapi.model.CCBAPIResponse; import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import java.io.InputStream; import java.util.concurrent.ConcurrentHashMap; /** * CCBXmlBinder is used to bind XML responses to CCBAPIResponse implementations. * * This class is thread-safe. */ public class CCBXmlBinder { private final XMLInputFactory xmlInputFactory; private final ConcurrentHashMap<Class<? extends CCBAPIResponse>, JAXBContext> jaxbContextCache; public CCBXmlBinder() { xmlInputFactory = XMLInputFactory.newFactory(); jaxbContextCache = new ConcurrentHashMap<>(); } public <T extends CCBAPIResponse> T bindResponseXML(InputStream response, Class<T> responseClass) throws CCBParseException { try { final XMLStreamReader xmlReader = xmlInputFactory.createXMLStreamReader(response); final JAXBContext jaxbContext = getJAXBContext(responseClass); final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); // Skip ahead to the response entity. while (xmlReader.hasNext()) { xmlReader.next(); if (xmlReader.isStartElement() && "response".equalsIgnoreCase(xmlReader.getLocalName())) { // Parse and return the response. // If the response cannot be parsed a JAXBException will be thrown. return (T) unmarshaller.unmarshal(xmlReader); } } // If we reach this point then the response did not contain a response element. throw new CCBParseException("Response did not contain a response element."); } catch (XMLStreamException | JAXBException e) { throw new CCBParseException("Failed to parse response.", e); } } /** * Find or create the JAXBContext for a CCBAPIResponse implementation. * * @param responseClass The response implementation class. * @return a JAXBContext which can be used to unmarshell the responseClass. */ private JAXBContext getJAXBContext(Class<? extends CCBAPIResponse> responseClass) { if (!jaxbContextCache.containsKey(responseClass)) { synchronized (jaxbContextCache) { // Check again to be sure. if (!jaxbContextCache.containsKey(responseClass)) { try { final JAXBContext jaxbContext = JAXBContext.newInstance(responseClass); jaxbContextCache.put(responseClass, jaxbContext); } catch (JAXBException e) { throw new AssertionError("Could not construct JAXBContext for " + responseClass.getName(), e); } } } } return jaxbContextCache.get(responseClass); } }
40.632911
118
0.661682
2df8c8d42aee94b866a3857ce10f53b3c6860afc
4,038
/* * Copyright 2020 Michael Kaisser * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * See also https://github.com/txtData/nlp */ package de.txtdata.asl.nlp.annotations; import de.txtdata.asl.nlp.models.Span; import de.txtdata.asl.util.misc.PrettyString; /** * Model class for an annotation in a text. */ public class Annotation extends Span{ private IAnnotationObject annotationObject; public Annotation(Span span, IAnnotationObject annotationObject){ super(span.getSurface(), span.getStarts(), span.getEnds()); this.annotationObject = annotationObject; } public Annotation(String surface, int starts, int ends, IAnnotationObject annotationObject){ super(surface, starts, ends); this.annotationObject = annotationObject; } public Annotation(Span span, String type){ super(span.getSurface(), span.getStarts(), span.getEnds()); this.annotationObject = new SimpleAnnotationObject(type); } public Annotation(String surface, int starts, int ends, String type){ super(surface, starts, ends); this.annotationObject = new SimpleAnnotationObject(type); } public void setAnnotationObject(IAnnotationObject annoObj){ this.annotationObject = annoObj; } public <T extends IAnnotationObject> T getAnnotationObject(Class<T> classOfT) { if (!classOfT.isInstance(this.getAnnotationObject())) return null; return (T) this.getAnnotationObject(); } public IAnnotationObject getAnnotationObject(){ return this.annotationObject; } public String getType(){ if (this.annotationObject!=null){ return this.annotationObject.getType(); }else { return null; } } public void setType(String type){ if (this.annotationObject!=null){ this.annotationObject.setType(type); } } public boolean equalsSpan(Span toCompare){ if (this.getEnds() != toCompare.getEnds()) return false; if (this.getStarts() != toCompare.getStarts()) return false; if (this.getSurface() != null ? !this.getSurface().equals(toCompare.getSurface()) : toCompare.getSurface() != null) return false; return true; } @Override public String toString(){ StringBuilder sb = new StringBuilder(); sb.append("[").append(this.getStarts()).append("-").append(this.getEnds()).append("] "); String span = sb.toString(); sb = new StringBuilder(); sb.append(PrettyString.create(span,11)); sb.append(" '").append(this.getSurface()).append("' "); if (annotationObject!=null) { sb.append(annotationObject.toString()); }else{ sb.append("[NO ANNOTATION OBJECT]"); } return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Annotation)) return false; Annotation that = (Annotation) o; if (annotationObject != null ? !annotationObject.equals(that.annotationObject) : that.annotationObject != null) return false; if (this.getEnds() != that.getEnds()) return false; if (this.getStarts() != that.getStarts()) return false; if (this.getSurface() != null ? !getSurface().equals(that.getSurface()) : that.getSurface() != null) return false; return true; } @Override public int hashCode() { return this.toString().hashCode(); } }
33.65
137
0.654037
4a0c37c11d7bc66c9223a9a207e09858fd91b148
1,442
package de.codewhite.jmet.target.impl; import com.rabbitmq.jms.admin.RMQConnectionFactory; import com.rabbitmq.jms.admin.RMQDestination; import de.codewhite.jmet.exceptions.InitException; import de.codewhite.jmet.target.JMSTarget; import de.codewhite.jmet.types.DestType; import de.codewhite.jmet.types.ModeType; import javax.jms.JMSException; import javax.jms.Session; /** * Created by kaimatt. */ public class RabbitMQTarget extends JMSTarget { public ModeType[] getSupportedModes() { return new ModeType[]{ModeType.AMQP10, ModeType.AMQPpre10}; } public void init() throws InitException { RMQConnectionFactory implFactory = new RMQConnectionFactory(); try { String uri = "amqp://" + getUser() + ":" + getPassword() + "@" + getHost() + ":" + getPort(); if (!getVhost().equals("/")) { uri = uri + "/" + getVhost(); } implFactory.setUri(uri); factory = implFactory; connection = factory.createConnection(getUser(), getPassword()); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); dest = new RMQDestination(getDestination(), getDestType() == DestType.QUEUE , false); producer = session.createProducer(dest); connection.start(); } catch (JMSException e) { throw new InitException(e.fillInStackTrace()); } } }
31.347826
105
0.642857
ab78e28c544bf0e13fc9d374b8f3485af759e5f2
1,569
package com.webs.api; import java.util.List; import com.webs.api.model.App; import com.webs.api.model.id.AppId; import com.webs.api.model.id.SiteId; /** * Interface which specifies all app-related calls to the Webs API * * @author Patrick Carroll */ public interface AppApi { /** * Get all publicly available apps * * @return A list of all publicly available apps on Webs.com */ public List<App> getAllApps(); /** * Get the app corresponding to the given appId * * @param appId The id of the corresponding app * * @return The app that was found or null if none are found */ public App getApp(final AppId appId); /** * Get all publicly installed apps on the site corresponding to siteId * * @param siteId The unique id corresponding to the site * * @return A list of all publicly available apps */ public List<App> getApps(final SiteId siteId); /** * Install the given app on a site. This method requires a valid OAuth * token with site owner permissions * * @param appId The unique id corresponding to the app to be * installed * @param siteId The unique id corresponding to the site */ public void installApp(final AppId appId, final SiteId siteId); /** * Uninstall the given app from a site. This method requires a valid * OAuth token with site owner permissions * * @param appId The unique id corresponding to the app to be * uninstalled * @param siteId The unique id corresponding to the site */ public void uninstallApp(final AppId appId, final SiteId siteId); }
25.721311
73
0.703633
41ea0a9ecd132344204d51ef32e66f9033a5541c
10,927
package com.immutables; /* * Copyright 2017 Justin Hughey * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import com.immutables.State.GetSet; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; public class StartHere { void start () { simple(); extension(); dynamic(); fun(); } /* Type definition for an "Immutable Type". */ public static class AnimalType extends LazyImmutableType { /* Define a type inside of itself? O_o */ private static final AnimalType ANIMAL_TYPE = Immutables.def(AnimalType.class); public static final String LION = "LION"; //Define the fields. public final ImmutableField<String> name = ImmutableField.of(String.class); public final ImmutableField<Integer> populationCount = ImmutableField.of(Integer.class); public final ImmutableField<Integer> legs = ImmutableField.of(Integer.class); //We can add validation. public final FieldValidation<String> nameUppercase = FieldValidation.on(name, v -> { if (v.toUpperCase().equals(v)) { return Optional.empty(); } return Optional.of("Name must be upper case."); } ); public AnimalType () { autoDefine(); } /* Re-usable populator based on the fields defined in AnimalType. */ public State populate (State state) { return state .populator() .set(name, LION) .set(legs, 0) .set(populationCount, 1) .done(); } /** * A quick way to get the type definition. * @return The type. */ public static final AnimalType type() { return ANIMAL_TYPE; } }; public void simple() { println("# Simple"); AnimalType animal = AnimalType.type(); // Set the instance's values, each set call creates a new state object. State state = AnimalType.type() .state() .field(animal.name).set(AnimalType.LION) .field(animal.populationCount).set(50000); try { //You can't access a field if it hasn't explicitly had a value set. state.field(animal.legs).get(); } catch (IllegalStateException e) { println("EXCEPTION: " + e.getMessage()); } println(""); // Alternatively, the more efficient way of doing things. It's basically a builder. state = animal .populator() .set(animal.name, AnimalType.LION) .set(animal.legs, 4) .set(animal.populationCount, 50000) .done(); // Get the values. String name = state.field(animal.name).get(); println("state.name: " + name); Integer legs = state.field(animal.legs).get(); println("state.legs: " + legs); Integer population = state.field(animal.populationCount).get(); println("state.populationCount: " + population); //We can print all the field values for a state instance if we want. println(""); State finalState = state; animal.getFields().forEach(f -> println(f.getName() + ":" + finalState.field(f).get())); } /* Type definition for an immutable type that composes itself using the previously defined "AnimalType". * No extension needed! */ public static class FuzzyAnimalType extends LazyImmutableType { public final AnimalType animalType = Immutables.def(AnimalType.class); public final ImmutableField<Boolean> fuzzy = ImmutableField.of(Boolean.class); public FuzzyAnimalType () { autoDefine(); } //Here is where type specific helper methods can be added. } public void extension () { println("\n# Extension"); // Create a new type that uses the same field declarations as AnimalType. FuzzyAnimalType fuzzyAnimalType = Immutables.def(FuzzyAnimalType.class); // Re-use the AnimalType field declarations. State state = AnimalType.type().populate(fuzzyAnimalType.state()); // Set the new field declaration. state = fuzzyAnimalType.fuzzy.set(state, true); //You can see all of the type's fields and any composed type's fields. ImmutableField<String> nameField = fuzzyAnimalType.animalType.name; println("nameField = fuzzyAnimalType.animalType.name"); ImmutableField<Boolean> fuzzyField = fuzzyAnimalType.fuzzy; println("fuzzyField = fuzzyAnimalType.fuzzy"); println(""); // Now read some values. state = state.field(nameField).set("LION"); String name = state.field(nameField).get(); println("state.field(nameField).get(): " + name); // Get the value, field first. Boolean isFuzzy1 = fuzzyField.get(state); println("fuzzyField.get(state): " + isFuzzy1); // Or get the value, state first. Boolean isFuzzy2 = state.field(fuzzyField).get(); println("state.field(fuzzyField).get(): " + isFuzzy2); // The field first approach can also be used to hold a reference to the "GetSet". GetSet<Boolean> getterSetter = state.field(fuzzyField); println("getterSetter.get(): " + getterSetter.get()); } public void dynamic () { println("\n# Dynamic"); // Dynamic field definition. ImmutableField<Fish> fishField = ImmutableField.of(Fish.class); // The following is effectively an anonymous type as we don't have a class declaration to // use with the Immutables.def(...) and Immutables.of(...) methods. AnimalType animal = AnimalType.type(); ImmutableType anonFishType = animal.addField(fishField); // Create a new state from our anonymous type. State fishState = anonFishType.state(); // Populate it using the same popluate method available on the AnimalType. // This works because the fields are shared. fishState = animal.populate(fishState); //It's not a lion! try { fishState = fishState.field(animal.name).set("fish"); } catch (FieldValidationException e) { //Whoops, uppercase animal names only! System.err.println(e.getMessages().stream().collect(Collectors.joining("\n"))); } fishState = fishState.field(animal.name).set("FISH"); // Now set the newly created fish field. State goldfishState = fishState.field(fishField).set(new Fish("goldfish")); // Check on the state of the fish. stateOfFish(goldfishState, fishField); // Check on the state of the fish after naming it. fishState = goldfishState.field(animal.name).set("SCALEXANDER"); stateOfFish(fishState, fishField); //You can also do fun things with the state. State s = new State(goldfishState.type()) { @Override public <T> Function<T, State> set (ImmutableField<T> field) { Function<T, State> fn = goldfishState.set(field); if (animal.name.equals(field)) { return fn.compose(v -> { println(String.format("You named your fish, %s.", v)); return v; }); } return fn; } }; println("\n## Now use the custom state type."); s.set(animal.name).apply("MOBY DICK"); } public void stateOfFish(State fs, ImmutableField<Fish> fishField) { AnimalType animal = AnimalType.type(); if ("FISH".equals(animal.name.get(fs))) { println(String.format("Are you going to give your %s a name?", fishField.get(fs).type)); } else { println(String.format("Alas poor %s %s, we barely knew him.", fishField.get(fs).type, animal.name.get(fs))); } } /* Fun */ public void fun () { println("\n# Fun"); PersonType type = Immutables.def(PersonType.class); // Create a person. State froedrick = type.state() .field(type.last).set("Frankenstein") .field(type.first).set("Froedrick"); ImmutableField<Boolean> normalBrain = ImmutableField.bool(); // Add a field to create a new type, person with brain. ImmutableType personWithBrain = type.addField(normalBrain); // Create a person with a brain, populator is available with anonymous immutable types. State monster = personWithBrain .state().populator() .set(normalBrain, false) .set(type.first, "The") .set(type.last, "Monster").done(); stateOfPerson(froedrick, type, normalBrain); stateOfPerson(monster, type, normalBrain); } /* Print the state of a person.*/ public void stateOfPerson(State s, PersonType type, ImmutableField<Boolean> normalBrain) { println("\nHello, " + s.field(type.first).get() + " " + s.field(type.last).get()); //We need to see if the state instance provided knows about normal brains. if (s.knows(normalBrain)) { if (s.field(normalBrain).get()) { println("You are normal."); } else { println("You are abby-normal!"); } } else { println("I can't tell if you're normal or not..."); } } public static class PersonType extends LazyImmutableType { public final ImmutableField<String> first = ImmutableField.string(); public final ImmutableField<String> last = ImmutableField.string(); public PersonType () { autoDefine(); } } private static class Fish { public final String type; Fish (String type) { this.type = type; } } public void println(Object s) { System.out.println(s); } public static void main (String[] args) { try { new StartHere().start(); } catch (FieldValidationException fve) { System.err.println(fve.getMessages().stream().collect(Collectors.joining("\n"))); } } }
35.477273
108
0.59623
90d8577b2eacbc4e5fdf6a8fc8294bcb694c55f4
850
package br.com.caelum.stella.validation.ie; import br.com.caelum.stella.MessageProducer; import br.com.caelum.stella.validation.Validator; public class IEGoiasValidatorTest extends IEValidatorTest { public IEGoiasValidatorTest() { super(wrongCheckDigitUnformattedString, validUnformattedString, validFormattedString, validValues); } private static final String wrongCheckDigitUnformattedString = "109876542"; private static final String validUnformattedString = "109876547"; private static final String validFormattedString = "10.987.654-7"; private static final String[] validValues = { validFormattedString, "10.103.119-1", "15.368.273-6" }; @Override protected Validator<String> getValidator(MessageProducer messageProducer, boolean isFormatted) { return new IEGoiasValidator(messageProducer, isFormatted); } }
30.357143
105
0.792941
0b4ad010fdd32b2b8253a81e1c448cf5e4d68882
1,214
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ package org.elasticsearch.xpack.core.ml.job.config; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Writeable; import java.io.IOException; import java.util.Locale; public enum Connective implements Writeable { OR, AND; /** * Case-insensitive from string method. * * @param value * String representation * @return The connective type */ public static Connective fromString(String value) { return Connective.valueOf(value.toUpperCase(Locale.ROOT)); } public static Connective readFromStream(StreamInput in) throws IOException { return in.readEnum(Connective.class); } @Override public void writeTo(StreamOutput out) throws IOException { out.writeEnum(this); } @Override public String toString() { return name().toLowerCase(Locale.ROOT); } }
28.232558
80
0.708402
476a5304f6567fd61e909361e9ddb085959e20dc
1,349
//@@author ZhangAnli package dog.pawbook.model.managedentity; import static java.util.Objects.requireNonNull; import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.function.Predicate; import javafx.util.Pair; /** * Tests that the ID of an Entity is within a supplied list of IDs. */ public class IdMatchPredicate implements Predicate<Pair<Integer, Entity>> { private final Set<Integer> relatedIds = new HashSet<>(); /** * Construct a predicate from a list of IDs. */ public IdMatchPredicate(Collection<Integer> idList) { requireNonNull(idList); this.relatedIds.addAll(idList); } /** * Construct a predicate for a single ID. */ public IdMatchPredicate(Integer id) { requireNonNull(id); this.relatedIds.add(id); } @Override public boolean test(Pair<Integer, Entity> idEntityPair) { requireNonNull(idEntityPair); return relatedIds.stream().anyMatch(id -> idEntityPair.getKey().equals(id)); } @Override public boolean equals(Object other) { return other == this // short circuit if same object || (other instanceof IdMatchPredicate // instanceof handles nulls && relatedIds.equals(((IdMatchPredicate) other).relatedIds)); // state check } }
26.98
92
0.670867
ac0b2a8cdccf1515485ecde727d8dff313c03372
746
package com.oath.cyclops.react; import cyclops.control.Either; import lombok.AllArgsConstructor; import lombok.Getter; @AllArgsConstructor public class SimpleReactFailedStageException extends RuntimeException { private static final long serialVersionUID = 1L; private final Object value; @Getter private final Throwable cause; public <T> T getValue() { return (T) value; } public static Either<Throwable, SimpleReactFailedStageException> matchable(final Throwable t) { final Either<Throwable, SimpleReactFailedStageException> error = t instanceof SimpleReactFailedStageException ? Either.right((SimpleReactFailedStageException) t) : Either.left(t); return error; } }
27.62963
117
0.738606
bf279fe221a4bbc0da842f63f936aafc6fdeb7bd
1,319
package net.minestom.server.entity.type.monster; import net.minestom.server.entity.EntityCreature; import net.minestom.server.entity.EntityType; import net.minestom.server.entity.Metadata; import net.minestom.server.entity.type.Monster; import net.minestom.server.utils.Position; public class EntityZombifiedPiglin extends EntityCreature implements Monster { public EntityZombifiedPiglin(Position spawnPosition) { super(EntityType.ZOMBIFIED_PIGLIN, spawnPosition); setBoundingBox(0.6f, 1.95f, 0.6f); } /** * Gets if the pig zombie is a baby. * * @return true if it is a baby, false otherwise */ public boolean isBaby() { return metadata.getIndex((byte) 15, false); } /** * Sets the pig zombie a baby or adult. * * @param baby true to make it a baby, false otherwise */ public void setBaby(boolean baby) { this.metadata.setIndex((byte) 15, Metadata.Boolean(baby)); } public boolean isBecomingDrowned() { return metadata.getIndex((byte) 17, false); } public void setBecomingDrowned(boolean becomingDrowned) { this.metadata.setIndex((byte) 17, Metadata.Boolean(becomingDrowned)); } @Override public double getEyeHeight() { return isBaby() ? 0.93 : 1.74; } }
28.06383
78
0.677786
db8f3f130704292d41b77b6d37c8e9e47b38deb8
1,577
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package io.github.mmm.ui.android.widget.input; import java.nio.channels.IllegalSelectorException; import android.widget.LinearLayout; import io.github.mmm.ui.android.widget.AndroidWidgetView; import io.github.mmm.ui.api.datatype.UiEnabledFlags; import io.github.mmm.ui.api.widget.UiLabel; import io.github.mmm.ui.api.widget.input.UiInput; import io.github.mmm.ui.api.widget.input.UiInputContainer; /** * {@link AndroidInput#getContainerWidget() Input container widget} for android. * * @param <V> type of the {@link UiInput#getValue() input value}. * @since 1.0.0 */ public class AndroidInputContainer<V> extends AndroidWidgetView<LinearLayout> implements UiInputContainer<V> { private UiInput<V> child; /** * The constructor. */ public AndroidInputContainer() { super(new LinearLayout(getContext())); } @Override public UiInput<V> getChild() { return this.child; } @Override public void setChild(UiInput<V> child) { if (this.child != null) { throw new IllegalSelectorException(); } this.child = child; UiLabel nameWidget = child.getNameWidget(); this.widget.addView(getTopWidget(nameWidget)); setParent(nameWidget, this); this.widget.addView(getTopWidget(child)); setParent(child, this); } @Override protected void setEnabledNative(boolean enabled) { super.setEnabledNative(enabled); this.child.setEnabled(enabled, UiEnabledFlags.PARENT); } }
26.283333
110
0.725428
86227777f33fbb1911ab103523d25b248cb812fd
225
class akash7 { public static void main(int a,int b,int r) { double pie=22/7; double area=pie*r*r; double cperi=2*pie*r; System.out.println("circle area..."+area); System.out.println("circle perimeter..."+cperi); } }
20.454545
49
0.675556
8158f1320cddbc73746c1f1699574c5a1b7298e7
595
package dev.shelenkov.microservicesgateway.web; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.client.RestClientException; @ControllerAdvice public class ErrorAdvice { @ExceptionHandler(RestClientException.class) public ResponseEntity<String> onServiceUnavailable() { return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Internal server error"); } }
35
101
0.826891
e3ae42e41d97d9fa36cff9adecb7c0925f4d8912
5,765
package org.voovan.network.udp; import org.voovan.network.*; import org.voovan.network.exception.ReadMessageException; import org.voovan.network.exception.SendMessageException; import org.voovan.network.tcp.TcpSession; import org.voovan.tools.log.Logger; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketOption; import java.nio.channels.DatagramChannel; import java.nio.channels.SelectionKey; import java.nio.channels.spi.SelectorProvider; /** * UdpSocket 连接 * * @author helyho * * Voovan Framework. * WebSite: https://github.com/helyho/Voovan * Licence: Apache v2 License */ public class UdpSocket extends SocketContext<DatagramChannel, UdpSession> { private SelectorProvider provider; private DatagramChannel datagramChannel; private UdpSession session; //用来阻塞当前Socket private Object waitObj; /** * socket 连接 * 默认不会出发空闲事件, 默认发超时时间: 1s * @param host 监听地址 * @param port 监听端口 * @param readTimeout 超时时间, 单位: 毫秒 * @throws IOException IO异常 */ public UdpSocket(String host, int port, int readTimeout) throws IOException{ super(host, port, readTimeout); } /** * socket 连接 * 默认发超时时间: 1s * @param host 监听地址 * @param port 监听端口 * @param idleInterval 空闲事件触发时间, 单位: 秒 * @param readTimeout 超时时间, 单位: 毫秒 * @throws IOException IO异常 */ public UdpSocket(String host, int port, int readTimeout, int idleInterval) throws IOException{ super(host, port, readTimeout, idleInterval); } /** * socket 连接 * @param host 监听地址 * @param port 监听端口 * @param idleInterval 空闲事件触发时间, 单位: 秒 * @param readTimeout 超时时间, 单位: 毫秒 * @param sendTimeout 发超时时间, 单位: 毫秒 * @throws IOException IO异常 */ public UdpSocket(String host, int port, int readTimeout, int sendTimeout, int idleInterval) throws IOException{ super(host, port, readTimeout, sendTimeout, idleInterval); } private void init() throws IOException { provider = SelectorProvider.provider(); datagramChannel = provider.openDatagramChannel(); datagramChannel.socket().setSoTimeout(this.readTimeout); InetSocketAddress address = new InetSocketAddress(this.host, this.port); session = new UdpSession(this, address); connectModel = ConnectModel.CLIENT; this.connectType = ConnectType.UDP; waitObj = new Object(); } /** * 构造函数 * @param parentSocketContext 父 SocketChannel 对象 * @param datagramChannel UDP通信对象 * @param socketAddress SocketAddress 对象 */ public UdpSocket(SocketContext parentSocketContext, DatagramChannel datagramChannel, InetSocketAddress socketAddress){ try { this.provider = SelectorProvider.provider(); this.datagramChannel = datagramChannel; this.copyFrom(parentSocketContext); this.session = new UdpSession(this, socketAddress); this.datagramChannel.configureBlocking(false); this.connectModel = ConnectModel.SERVER; this.connectType = ConnectType.UDP; } catch (Exception e) { Logger.error("Create socket channel failed",e); } } @Override public void setIdleInterval(int idleInterval) { this.idleInterval = idleInterval; } /** * 设置 Socket 的 Option 选项 * * @param name SocketOption类型的枚举, 参照:DatagramChannel.setOption的说明 * @param value SocketOption参数 * @throws IOException IO异常 */ public <T> void setOption(SocketOption<T> name, T value) throws IOException { datagramChannel.setOption(name, value); } @Override public DatagramChannel socketChannel() { return datagramChannel; } /** * 获取 Session 对象 * @return Session 对象 */ public UdpSession getSession(){ return session; } @Override public void start() throws IOException { syncStart(); synchronized (waitObj){ try { waitObj.wait(); } catch (InterruptedException e) { Logger.error(e); } } } /** * 启动同步的上下文连接,同步读写时使用 */ public void syncStart() throws IOException { init(); datagramChannel.connect(new InetSocketAddress(this.host, this.port)); datagramChannel.configureBlocking(false); IoPlugin.initChain(this); bindToSocketSelector(SelectionKey.OP_READ); hold(); } @Override public void acceptStart() throws IOException { IoPlugin.initChain(this); bindToSocketSelector(0); } /** * 同步读取消息 * @return 读取出的对象 * @throws ReadMessageException 读取消息异常 */ public Object syncRead() throws ReadMessageException { return session.syncRead(); } /** * 同步发送消息 * @param obj 要发送的对象 * @throws SendMessageException 消息发送异常 */ public void syncSend(Object obj) throws SendMessageException { session.syncSend(obj); } @Override public boolean isOpen() { if (datagramChannel.isOpen()) { return true; } else { return false; } } @Override public boolean isConnected() { if (datagramChannel.isConnected()) { return true; } else { return false; } } @Override public boolean close() { if(datagramChannel!=null){ session.release(); synchronized (waitObj) { waitObj.notify(); } return true; } else { synchronized (waitObj) { waitObj.notify(); } return true; } } }
25.968468
122
0.622376
9074560ec9bfc63e66b6f0b6a4166a8f6591e570
747
package dev.kxxcn.app_squad.ui.main.match.fab.quick; import dev.kxxcn.app_squad.data.model.User; import dev.kxxcn.app_squad.ui.BasePresenter; import dev.kxxcn.app_squad.ui.BaseView; import dev.kxxcn.app_squad.util.Constants; /** * Created by kxxcn on 2018-08-03. */ public interface QuickContract { interface View extends BaseView<Presenter> { void showSuccessfullyLoadAccount(User user); void showEnemyData(User user); void showSuccessfullyRequested(); void showUnsuccessfullyRequested(); } interface Presenter extends BasePresenter { void onLoadAccount(); void onLoadEnemyData(String enemy); void onRequest(String to, String title, String message, String from, String date, Constants.ListsFilterType filterType); } }
24.9
122
0.780455
cfb71ca39bcfcc569c17fb3249e6cf8b72896b93
854
package karob.bigtrees.config.defaults; import karob.bigtrees.config.Algorithm; import karob.bigtrees.config.BlockAndMeta; import karob.bigtrees.config.TreeConfiguration; import net.minecraft.init.Blocks; public class TallOakTreeDefaults extends TreeConfiguration { public TallOakTreeDefaults() { algorithm = Algorithm.TallOak; name = "Tall Oak"; minHeight = 13; maxHeight = 28; wood = new BlockAndMeta(Blocks.log, 0); leaf = new BlockAndMeta(Blocks.leaves, 0); minNoiseValue = 0; maxNoiseValue = 40; minBranchless = 0.23; maxBranchless = 0.32; longestBranchPercentage = 0.60; branchRotation = 0.618034; tapLength = 0.5; branchSpace = 0.6; pitch = 0.0; curl = 0.08; leafRadius = 3; subBranchDensity = 0.12; subBranchingLength = 0.60; subBranchingSize = 4; subBranchAngle = 30; subBranchSize = 0.75; } }
24.4
60
0.724824
7244bd8bd2cb38b912df2b370bcc2c089299225b
3,714
package com.android.library; import android.app.Application; import android.content.Context; import android.content.res.Resources; import android.support.annotation.ArrayRes; import android.support.annotation.StringRes; import com.android.library.httptask.RetroRequestQueue; import com.android.library.httptask.RetroVolley; import com.android.library.injection.component.AppComponent; import com.android.library.injection.component.DaggerAppComponent; import com.android.library.injection.module.AppModule; import com.android.library.utils.LogMgr; import com.android.library.utils.ToastUtil; import com.android.volley.Cache; import com.android.volley.RequestQueue.RequestFinishedListener; import com.android.volley.VolleyLog; import com.facebook.drawee.backends.pipeline.Fresco; import butterknife.ButterKnife; /** * Created by KEVIN.DAI on 15/7/8. */ public class BaseApplication extends Application { private static Context mContext; /** * Global request queue for Volley. */ private static RetroRequestQueue mReqQueue; private AppComponent mComponent; @Override public void onCreate() { super.onCreate(); initAppComponent(); initContext(); initVolley(); initFresco(); ButterKnife.setDebug(!BuildConfig.RELEASE); } private void initAppComponent() { mComponent = DaggerAppComponent.builder() .appModule(new AppModule(this)) .build(); } public AppComponent component() { return mComponent; } private void initContext() { mContext = getApplicationContext(); } public static Context getContext() { return mContext; } private static void releaseContext() { mContext = null; } public static Resources getAppResources() { return mContext.getResources(); } public static String getAppString(@StringRes int resId) { return getAppResources().getString(resId); } public static String getAppString(@StringRes int resId, Object... formatArgs) { return getAppResources().getString(resId, formatArgs); } public static String[] getAppStringArray(@ArrayRes int resId) { return getAppResources().getStringArray(resId); } /** * the queue will be created if it is null. */ private void initVolley() { if (mReqQueue == null) { mReqQueue = RetroVolley.newRequestQueue(mContext); mReqQueue.addRequestFinishedListener(mReqFinishLis); } VolleyLog.DEBUG = !BuildConfig.RELEASE; } private void initFresco() { Fresco.initialize(this); } /** * @return The Volley Request queue. */ public static RetroRequestQueue getRequestQueue() { return mReqQueue; } public static Cache getVolleyCache() { return mReqQueue == null ? null : mReqQueue.getCache(); } private static RequestFinishedListener mReqFinishLis = request -> { if (!BuildConfig.RELEASE) LogMgr.d("BaseApplication", "~~request finished. tag: " + request.getTag() + ", sequence number: " + request.getSequence()); }; private static void releaseVolley() { if (mReqQueue != null) { mReqQueue.removeRequestFinishedListener(mReqFinishLis); mReqQueue.cancelAll(request -> true); // mReqQueue.stop(); // mReqQueue = null; } } private static void releaseFresco() { Fresco.shutDown(); } protected static void release() { // releaseFresco(); releaseVolley(); // releaseContext(); ToastUtil.release(); } }
24.27451
136
0.659397
476626d5b7feb43506e82721eea550271a72fba3
2,262
package extraction; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.time.Duration; public class MulticomTest { @Test void tst1(){ var test = "a { main {b!<msg1>; b?; stop} } | " + "b { main {a!<msg2>; a?; stop} }"; var expected = "main {(a.msg1->b, b.msg2->a); stop}"; var actual = Extraction.extractChoreography(test).toString(); Assertions.assertEquals(expected, actual); } @Test void tst2(){ var test = "a { main {b?; b!<msg1>; b?; c?; stop} } |" + "b { main {a!<pre>; a!<msg2>; c!<msg3>; a?; stop} } |" + "c { main {b?; a!<post>; stop} }"; var expected = "main {b.pre->a; (a.msg1->b, b.msg2->a, b.msg3->c); c.post->a; stop}"; var actual = Extraction.extractChoreography(test).toString(); Assertions.assertEquals(expected, actual); } @Test void alt2bit(){ var test = "a { def X {b?; b!<0>; b?; b!<1>; X} main {b!<0>; b!<1>; X} } |" + "b { def Y {a?; a!<ack0>; a?; a!<ack1>; Y} main {Y} }"; var expected = "def X1 { (a.1->b, b.ack0->a); (a.0->b, b.ack1->a); X1 } main {a.0->b; X1}"; var actual = Extraction.extractChoreography(test).toString(); Assertions.assertEquals(expected, actual); } @Test void introduction(){ var test = "a { main { b<->c; b?; stop}} |" + "b { main { a!<msg>; a?c; c!<hello>; stop}} |" + "c {main { a?b; b?; stop}}"; var expected = "main {(b.msg->a, a.b<->c); b.hello->c; stop}"; var actual = Extraction.extractChoreography(test).toString(); Assertions.assertEquals(expected, actual); } @Test //Tests a special tricky condition such as X=q!<>;p!<>;X which used to create an infinite loop in multicom void infiniteSend(){ //The network is not extractable, but it doesn't matter var test = "a { def X{ b!<msg>; X } main{ X } } |" + "b { def X{ a!<start>; X } main{ X } }"; Assertions.assertTimeoutPreemptively(Duration.ofSeconds(3), ()->Extraction.extractChoreography(test)); } }
34.8
118
0.51061
90923956ac36fa481ed8dde82fd00204db69d869
474
package com.sparta.eng50.pageModels; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class TShirtsPage extends AbstractPage { By productButton = By.xpath("//*[@id=\"center_column\"]/ul/li/div/div[1]/div/a[1]/img"); public TShirtsPage(WebDriver webDriver) { super(webDriver); } public ItemPage navigateToItemPage() { webDriver.findElement(productButton).click(); return new ItemPage(webDriver); } }
26.333333
92
0.696203
216aedea5a246b76448b91df0f3b13ebf4d72116
6,143
/* * Copyright (C) 2012 www.amsoft.cn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.kadaluarsa.cleaner.utils; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.drawable.Drawable; import com.kadaluarsa.cleaner.model.AutoStartInfo; import java.util.ArrayList; import java.util.Iterator; import java.util.List; // TODO: Auto-generated Javadoc public class BootStartUtils { private static final String BOOT_START_PERMISSION = "android.permission.RECEIVE_BOOT_COMPLETED"; // private Context mContext; public BootStartUtils(Context context) { // mContext = context; } public static List<AutoStartInfo> fetchInstalledApps(Context mContext) { PackageManager pm = mContext.getPackageManager(); List<ApplicationInfo> appInfo = pm.getInstalledApplications(0); Iterator<ApplicationInfo> appInfoIterator = appInfo.iterator(); List<AutoStartInfo> appList = new ArrayList<AutoStartInfo>(appInfo.size()); while (appInfoIterator.hasNext()) { ApplicationInfo app = appInfoIterator.next(); int flag = pm.checkPermission( BOOT_START_PERMISSION, app.packageName); if (flag == PackageManager.PERMISSION_GRANTED) { AutoStartInfo appMap = new AutoStartInfo(); String label = pm.getApplicationLabel(app).toString(); Drawable icon = pm.getApplicationIcon(app); String packageName = app.packageName; if ((app.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { appMap.setSystem(true); //abAppProcessInfo.isSystem = true; } else { appMap.setSystem(false); // abAppProcessInfo.isSystem = false; } // appMap.setDesc(desc); appMap.setIcon(icon); appMap.setPackageName(packageName); appMap.setLabel(label); appList.add(appMap); } } return appList; } public static List<AutoStartInfo> fetchAutoApps(Context mContext) { PackageManager pm = mContext.getPackageManager(); Intent intent = new Intent(Intent.ACTION_BOOT_COMPLETED); List<ResolveInfo> resolveInfoList = pm.queryBroadcastReceivers(intent, PackageManager.GET_DISABLED_COMPONENTS); List<AutoStartInfo> appList = new ArrayList<AutoStartInfo>(); String appName = null; String packageReceiver = null; Drawable icon = null; boolean isSystem = false; boolean isenable = true; StringBuilder strb; if (resolveInfoList.size() > 0) { appName = resolveInfoList.get(0).loadLabel(pm).toString(); strb = new StringBuilder(resolveInfoList.get(0).activityInfo.packageName + "/" + resolveInfoList.get(0).activityInfo.name); packageReceiver = strb.toString(); icon = resolveInfoList.get(0).loadIcon(pm); ComponentName mComponentName1 = new ComponentName(resolveInfoList.get(0).activityInfo.packageName, resolveInfoList.get(0).activityInfo.name); if (pm.getComponentEnabledSetting(mComponentName1) == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) { isenable = false; } if ((resolveInfoList.get(0).activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { isSystem = true; } for (int i = 1; i < resolveInfoList.size(); i++) { AutoStartInfo mAutoStartInfo = new AutoStartInfo(); if (appName.equals(resolveInfoList.get(i).loadLabel(pm).toString())) { strb.append(packageReceiver).append(";").append(resolveInfoList.get(i).activityInfo.packageName).append("/").append(resolveInfoList.get(i).activityInfo.name); packageReceiver = strb.toString(); } else { mAutoStartInfo.setLabel(appName); mAutoStartInfo.setSystem(isSystem); mAutoStartInfo.setEnable(isenable); mAutoStartInfo.setIcon(icon); mAutoStartInfo.setPackageReceiver(packageReceiver); appList.add(mAutoStartInfo); appName = resolveInfoList.get(i).loadLabel(pm).toString(); packageReceiver = resolveInfoList.get(i).activityInfo.packageName + "/" + resolveInfoList.get(i).activityInfo.name; icon = resolveInfoList.get(i).loadIcon(pm); ComponentName mComponentName2 = new ComponentName(resolveInfoList.get(i).activityInfo.packageName, resolveInfoList.get(i).activityInfo.name); isenable = pm.getComponentEnabledSetting(mComponentName2) != PackageManager.COMPONENT_ENABLED_STATE_DISABLED; isSystem = (resolveInfoList.get(i).activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; } } AutoStartInfo mAutoStartInfo = new AutoStartInfo(); mAutoStartInfo.setLabel(appName); mAutoStartInfo.setSystem(isSystem); mAutoStartInfo.setEnable(isenable); mAutoStartInfo.setIcon(icon); mAutoStartInfo.setPackageReceiver(packageReceiver); appList.add(mAutoStartInfo); } return appList; } }
44.194245
178
0.646427
9ce291b4fec1106d3a8f6ef73c8a3ad4b62e5996
10,419
package com.thinkbiganalytics.kylo.spark.config; /*- * #%L * kylo-spark-livy-server * %% * Copyright (C) 2017 - 2018 ThinkBig Analytics, a Teradata Company * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.google.common.collect.Lists; import com.thinkbiganalytics.kylo.spark.exceptions.LivyConfigurationException; import com.thinkbiganalytics.kylo.spark.model.enums.SessionKind; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.AbstractEnvironment; import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.Environment; import org.springframework.core.env.MutablePropertySources; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.stream.StreamSupport; import javax.annotation.PostConstruct; /** * Properties specific to configuring Livy */ public class LivyProperties { private static final Logger logger = LoggerFactory.getLogger(LivyProperties.class); /** * The hostname for the Livy server. e.g. sandbox.kylo.io */ private String hostname; /** * The port for the Livy server. e.g. 8998 */ private Integer port; /** * Instructs Kylo to impersonate the logged in user. e.g. true */ private Boolean proxyUser = false; /** * path of the Truststore : Truststore will be necessary if Livy server has been configured for SSL **/ private String truststorePath; /** * password for the Truststore : Truststore will be necessary if Livy server has been configured for SSL **/ private char[] truststorePassword; /** * the type of the Truststore : Truststore will be necessary if Livy server has been configured for SSL **/ private String truststoreType; /** * 'shared' or 'spark'. Either accept our scala scripts, but there may be differences between them. Other types not yet supported */ private SessionKind livySessionKind = SessionKind.shared; /** * If monitorLivy is true then a background thread will periodically check on Livy server status */ private Boolean monitorLivy = false; /** * How often, in milliseconds, to check Livy under normal circumstances */ private int heartbeatInterval = 1000; /** * mark the Livy server as not_found after this many attempts */ private Integer triesUntilNotFound = 10; /** * Got a failed heartbeat from Livy? This is the base time for checking again, in milliseconds. It follows an exponential growth pattern so if it is 100ms for example, the next will be 200 then * 400 etc. */ private int delayCheckOnFail = 100; /** * Max time to delay for checking on an unresponsive Livy server. */ private int maxDelayCheckOnFail = 10000; /** * Time, in milliseconds, to wait for start of Livy session, if exceeded, blocked threads release and will produce an exception */ private Long waitForStart = 120000L; /** * Time, in milliseconds, between polls of the Livy Server when polling for statement results */ private Long pollingInterval = 250L; /** * Time, in milliseconds, that Kylo Services will poll Livy */ private Long pollingLimit = 500L; /** * All properties found that start with "spark." but not "spark.shell" or "spark.livy" that can be passed to spark sessions */ private Map<String, String> sparkProperties = new HashMap<>(); @Autowired private Environment env; public String getHostname() { return hostname; } public void setHostname(String hostname) { this.hostname = hostname; } public Integer getPort() { return port; } public void setPort(Integer port) { this.port = port; } public Boolean getProxyUser() { return proxyUser; } public void setProxyUser(Boolean proxyUser) { if (proxyUser == null) { proxyUser = false; } this.proxyUser = proxyUser; } public String getTruststorePath() { return truststorePath; } public void setTruststorePath(String truststorePath) { this.truststorePath = truststorePath; } public char[] getTruststorePassword() { return truststorePassword; } public void setTruststorePassword(char[] truststorePassword) { this.truststorePassword = truststorePassword; } public String getTruststoreType() { return truststoreType; } public void setTruststoreType(String truststoreType) { this.truststoreType = truststoreType; } public Map<String, String> getSparkProperties() { return sparkProperties; } public void setSparkProperties(Map<String, String> sparkProperties) { this.sparkProperties = sparkProperties; } public SessionKind getLivySessionKind() { return livySessionKind; } public void setLivySessionKind(SessionKind livySessionKind) { this.livySessionKind = livySessionKind; } public Boolean isMonitorLivy() { return monitorLivy; } public void setMonitorLivy(Boolean monitorLivy) { this.monitorLivy = monitorLivy; } public int getHeartbeatInterval() { return heartbeatInterval; } public void setHeartbeatInterval(int heartbeatInterval) { this.heartbeatInterval = heartbeatInterval; } public Integer getTriesUntilNotFound() { return triesUntilNotFound; } public void setTriesUntilNotFound(Integer triesUntilNotFound) { this.triesUntilNotFound = triesUntilNotFound; } public int getDelayCheckOnFail() { return delayCheckOnFail; } public void setDelayCheckOnFail(int delayCheckOnFail) { this.delayCheckOnFail = delayCheckOnFail; } public int getMaxDelayCheckOnFail() { return maxDelayCheckOnFail; } public void setMaxDelayCheckOnFail(int maxDelayCheckOnFail) { this.maxDelayCheckOnFail = maxDelayCheckOnFail; } public Long getWaitForStart() { return waitForStart; } public void setWaitForStart(Long waitForStart) { this.waitForStart = waitForStart; } public Long getPollingInterval() { return pollingInterval; } public void setPollingInterval(Long pollingInterval) { this.pollingInterval = pollingInterval; } public Long getPollingLimit() { return pollingLimit; } public void setPollingLimit(Long pollingLimit) { this.pollingLimit = pollingLimit; } @PostConstruct private void postConstruct() { logger.debug("PostConstruct called for LivyProperties"); if (!Lists.newArrayList(env.getActiveProfiles()).contains("kylo-livy")) { throw new IllegalStateException("Attempting to instantiate LivyProperties bean when 'kylo-livy' is not an active profile"); } if (!StringUtils.isNotEmpty(hostname)) { throw new LivyConfigurationException("Attempt to start when 'kylo-livy' is an active profile and property 'spark.livy.hostname' not defined, or invalid."); } if (port == null || port <= 0) { throw new LivyConfigurationException("Attempt to start when 'kylo-livy' is an active profile and property 'spark.livy.port' not defined, or invalid."); } logger.debug("determine the set of spark properties to pass to Livy"); MutablePropertySources propSrcs = ((AbstractEnvironment) env).getPropertySources(); StreamSupport.stream(propSrcs.spliterator(), false) .filter(ps -> ps instanceof EnumerablePropertySource) .map(ps -> ((EnumerablePropertySource) ps).getPropertyNames()) .flatMap(Arrays::<String>stream) .filter(propName -> propName.startsWith("spark.") && !(propName.startsWith("spark.livy.") || propName.startsWith("spark.shell."))) .forEach(propName -> sparkProperties.put(propName, env.getProperty(propName))); logger.debug("Validate session kinds are supportable"); if (!(livySessionKind.equals(SessionKind.shared) || livySessionKind.equals(SessionKind.spark))) { throw new LivyConfigurationException(String.format("Session kind='%s' is not yet supported")); } logger.info("The following spark properties were found in kylo config files: '{}'", sparkProperties); } @Override public String toString() { return new StringBuilder("LivyProperties{") .append("hostname='").append(hostname).append('\'') .append(", port=").append(port) .append(", proxyUser=").append(proxyUser) .append(", truststorePath='").append(truststorePath).append('\'') .append(", truststorePassword=").append("XXXXXXX") .append(", truststoreType='").append(truststoreType).append('\'') .append(", livySessionKind=").append(livySessionKind) .append(", monitorLivy=").append(monitorLivy) .append(", heartbeatInterval=").append(heartbeatInterval) .append(", pollingInterval=").append(pollingInterval) .append(", pollingLimit=").append(pollingLimit) .append(", triesUntilNotFound=").append(triesUntilNotFound) .append(", delayCheckOnFail=").append(delayCheckOnFail) .append(", maxDelayCheckOnFail=").append(maxDelayCheckOnFail) .append(", waitForStart=").append(waitForStart) .append(", sparkProperties=").append(sparkProperties) .append(", env=").append(env) .append('}') .toString(); } }
31.862385
198
0.67089
23c8360fc44c75379b741328598f57e0fb47ccd8
4,620
package com.example.springjsonstreamtest.application.service; import com.example.springjsonstreamtest.domain.model.test.RegistTestData; import com.example.springjsonstreamtest.domain.repository.TestCommandRepository; import com.example.springjsonstreamtest.domain.repository.TestQueryRepository; import com.example.springjsonstreamtest.presentation.converter.TestRecordConverter; import com.example.springjsonstreamtest.presentation.response.CountResponse; import com.example.springjsonstreamtest.presentation.response.NormalResponse; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @Service @RequiredArgsConstructor public class TestService { private final TestCommandRepository testCommandRepository; private final TestQueryRepository testQueryRepository; // private static final Integer MAX_RECORDS = 1; private static final Integer MAX_RECORDS = 100000; @Transactional public void registTestData() { final List<RegistTestData> registTestData = new ArrayList<>(); for (int i = 0; i < MAX_RECORDS; i++) { registTestData.add(createRegistTestData(i)); } testCommandRepository.batchInsert(registTestData); } public CountResponse getRecordCount() { return new CountResponse(testQueryRepository.getRecordCount()); } public NormalResponse getNormalResponse() { return testQueryRepository.getNormalResponse(); } public Integer generateStreamResponse(TestRecordConverter testRecordConverter) { return testQueryRepository.generateStreamResponse(testRecordConverter); } private RegistTestData createRegistTestData(Integer id) { return RegistTestData.builder() .createDate(LocalDateTime.now()) .firstName(String.format("%d太郎", id)) .lastName("太郎") .dummy1("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy3("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy4("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy5("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy6("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy7("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy8("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy9("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy10("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy11("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy12("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy13("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy14("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy15("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy16("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy17("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy18("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy19("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .dummy20("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") .build(); } }
59.230769
128
0.798268
37dca050cb4b65312943040f57545c1263f9adfb
10,927
package cn.oftenporter.oftendb.data; import cn.oftenporter.oftendb.db.Condition; import cn.oftenporter.oftendb.db.NameValues; import cn.oftenporter.oftendb.db.QuerySettings; import cn.oftenporter.oftendb.db.Unit; import cn.oftenporter.porter.core.base.InNames; import cn.oftenporter.porter.core.base.WObject; import com.alibaba.fastjson.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.reflect.Field; import java.util.*; import java.util.concurrent.ConcurrentHashMap; /** * 父类的相关注解变量(public)在子类中仍然有效。 * * @author ZhuiFeng */ public abstract class Data extends DataAble { private static final Logger LOGGER = LoggerFactory.getLogger(Data.class); private static class ClassAndField { private String[] names; private Field[] fields; private String[] tiedNames; public ClassAndField(Class<?> clazz) throws NoSuchFieldException { Field[] fields = clazz.getFields(); String[] names = new String[fields.length]; for (int i = 0; i < names.length; i++) { names[i] = fields[i].getName(); } Arrays.sort(names); List<String> nameList = new ArrayList<>(); List<Field> fieldList = new ArrayList<>(); List<String> tiedNameList = new ArrayList<>(); for (int i = 0; i < names.length; i++) { Field f = clazz.getField(names[i]); String tiedName = DataUtil.getTiedName(f); if (tiedName!=null) { f.setAccessible(true); nameList.add(names[i]); fieldList.add(f); tiedNameList.add(tiedName); } } this.names = nameList.toArray(new String[0]); this.fields = fieldList.toArray(new Field[0]); this.tiedNames = tiedNameList.toArray(new String[0]); } public Field[] getFields() { return fields; } public String[] getNames() { return names; } public String tiedName(String fieldName) { int index = Arrays.binarySearch(names, fieldName); return index >= 0 ? tiedNames[index] : null; } public String tiedName(int index) { return tiedNames[index]; } public Field byIndex(int index) { return fields[index]; } public Field byName(String fieldName) { int index = Arrays.binarySearch(names, fieldName); Field f = index >= 0 ? fields[index] : null; return f; } } private static final Map<Class<?>, ClassAndField> classFields = new ConcurrentHashMap<>(); public Data() { try { classFields.put(getClass(), new ClassAndField(getClass())); } catch (NoSuchFieldException e) { throw new RuntimeException(e); } } /** * 转换成json对象. * * @return 若为null表示转换出现失败。 */ @Override public JSONObject toJsonObject() { JSONObject jsonObject = null; try { ClassAndField cf = getClassAndField(); Field[] fs = cf.getFields(); String[] names = cf.names; JSONObject json = new JSONObject(fs.length); for (int i = 0; i < fs.length; i++) { json.put(names[i], fs[i].get(this)); } jsonObject = json; } catch (Exception e) { LOGGER.error(e.getMessage(), e); } return jsonObject; } private void setValue(ClassAndField cf, InNames.Name[] names, Object[] values) throws IllegalAccessException { if (names != null && names.length > 0) { for (int i = 0; i < names.length; i++) { if (values[i] != null) { Field field = cf.byName(names[i].varName); if (field != null) { field.set(this, values[i]); } } } } } /** * 设置值. * * @param neceFields 必需参数名 * @param nvalues 为null的不会设置. * @param unneceFields 非必需参数名 * @param uvalues 非必需参数,为null的不会设置. * @throws Exception */ @Override protected final void setParams(InNames.Name[] neceFields, Object[] nvalues, InNames.Name[] unneceFields, Object[] uvalues, InNames.Name[] innerNames, Object[] inners) throws Exception { ClassAndField cf = getClassAndField(); setValue(cf, neceFields, nvalues); setValue(cf, unneceFields, uvalues); setValue(cf, innerNames, inners); } private ClassAndField getClassAndField() { ClassAndField cf = classFields.get(getClass()); return cf; } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } /** * 得到所属集合(或表)名称。 * * @return */ public abstract String getCollectionName(); private Condition queryCondition; private KeysSelection keysSelection; public void setForKeys(KeysSelection keysSelection) { this.keysSelection = keysSelection; } public void setForQuery(Condition queryCondition) { this.queryCondition = queryCondition; } /** * 用于数据库修改、查询或删除时的寻找条件 * * @return */ public Condition forQuery() { return queryCondition; } public KeysSelection keys() { return keysSelection; } /** * <pre> * 设置类变量完成时、且在进行数据库调用前调用此函数. * 对于{@linkplain SetType#QUERY}和{@linkplain SetType#DELETE}不会设置值 * ({@linkplain #setParams(InNames.Name[], Object[], InNames.Name[], Object[], InNames.Name[], Object[])}) * ,但会调用本函数。 * </pre> * * @param setType * @param optionCode 可选code * @param wObject * @param dbHandleAccess * @throws DataException 若抛出异常,则向客户端响应失败。 */ public abstract void whenSetDataFinished(SetType setType, int optionCode, WObject wObject, DBHandleAccess dbHandleAccess) throws DataException; @Override protected final NameValues toNameValues(ParamsGetter.Params params) throws Exception { ClassAndField cf = getClassAndField(); Field[] fields = cf.getFields(); NameValues nameValues = new NameValues(fields.length); for (int i = 0; i < fields.length; i++) { nameValues.put(cf.tiedName(i), fields[i].get(this)); } return nameValues; } @Override protected String[] getFinalKeys(KeysSelection keysSelection, ParamsGetter.Params params) { String[] keys = null; if (keysSelection != null) { ClassAndField cf = getClassAndField(); if (keysSelection.isSelect) { keys = keysSelection.keys; // 转换成数据库的名称 for (int i = 0; i < keys.length; i++) { keys[i] = cf.tiedName(keys[i]); } } else { String[] unKeys = keysSelection.keys; List<String> list = new ArrayList<String>(); Field[] fields = cf.getFields(); String[] names = cf.getNames(); for (int i = 0; i < fields.length; i++) { String name = names[i]; if (DataUtil.indexOf(unKeys, name) == -1) { list.add(cf.tiedName(i)); } } keys = list.toArray(new String[0]); } } return keys; } @Override protected final void dealNames(Condition condition) { condition.dealNames(getClass()); } @Override protected final void dealNames(QuerySettings querySettings) { querySettings._dealNames(getClass()); } protected final Condition getQuery(DBHandleSource dbHandleSource, ParamsSelection selection, WObject wObject, ParamsGetter.Params params) { Condition condition = null; if (selection != null) { condition = dbHandleSource.newCondition(); boolean toNull; int[] nIndexes = selection.nIndexes; ClassAndField cf = getClassAndField(); if (nIndexes != null) { InNames.Name[] fnNames = wObject.fInNames.nece; Object[] fn = wObject.fn; for (int i = 0; i < nIndexes.length; i++) { int index = nIndexes[i]; if (index < 0) { index = -(index + 1); toNull = true; } else { toNull = false; } if (fn[index] != null) { String sname = cf.tiedName(fnNames[index].varName); condition.put(Condition.EQ, new Unit(sname, fn[index])); if (toNull) { fn[index] = null; } } } } int[] uIndexes = selection.uIndexes; if (uIndexes != null) { InNames.Name[] fuNames = wObject.fInNames.unece; Object[] fu = wObject.fu; for (int i = 0; i < uIndexes.length; i++) { int index = uIndexes[i]; if (index < 0) { index = -(index + 1); toNull = true; } else { toNull = false; } if (fu[index] != null) { String sname = cf.tiedName(fuNames[index].varName); condition.put(Condition.EQ, new Unit(sname, fu[index])); if (toNull) { fu[index] = null; } } } } } return condition; } @Override protected DataAble cloneData() { try { DataAble dataAble = (DataAble) clone(); return dataAble; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } }
27.04703
113
0.494372
66703124908c1a731197d6b7984144c9dfbd2637
1,313
package com.lihuia.mysterious.core.vo.testcase; import com.lihuia.mysterious.core.vo.base.BaseVO; import com.lihuia.mysterious.core.vo.csv.CsvVO; import com.lihuia.mysterious.core.vo.jar.JarVO; import com.lihuia.mysterious.core.vo.jmx.JmxVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import java.util.List; /** * @author lihuia.com * @date 2022/4/2 11:53 AM */ @Data @ApiModel @EqualsAndHashCode(callSuper = true) public class TestCaseFullVO extends BaseVO<Long> { @ApiModelProperty(value = "用例名称") private String name; @ApiModelProperty(value = "用例描述") private String description; @ApiModelProperty(value = "业务线") private String biz; @ApiModelProperty(value = "服务") private String service; @ApiModelProperty(value = "版本号") private String version; @ApiModelProperty(value = "执行状态; 0-未执行,1-执行中, 2-执行成功, 3-执行异常, 4-等待执行, 5-排队取消") private Integer status; @ApiModelProperty(value = "用例目录") private String testCaseDir; @ApiModelProperty(value = "用例关联的JMX脚本") private JmxVO jmxVO; @ApiModelProperty(value = "用例关联的CSV文件") private List<CsvVO> csvVOList; @ApiModelProperty(value = "用例关联的JAR包") private List<JarVO> jarVOList; }
24.314815
82
0.724296
c8146e66496b8ec7ad58f2e5185008e927167e9b
1,534
package com.hanyi.demo.controller; import com.hanyi.demo.component.MapEhcaChe; import com.hanyi.demo.service.EmployeeService; import com.hanyi.framework.model.response.ResponseResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.CacheManager; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @ClassName: middleground com.hanyi.demo.controller CacheController * @Author: weiwenchang * @Description: java类作用描述 * @CreateDate: 2019-11-12 21:20 * @Version: 1.0 */ @RestController @RequestMapping("/cache") public class CacheController { @Autowired private EmployeeService employeeService; @Autowired private CacheManager cacheManager; @Autowired private MapEhcaChe<String, String> mapEhcaChe; @GetMapping("/remoKey") public void remoKey() { cacheManager.getCache("employeeCache").clear(); } @GetMapping(value = "/{id}") public ResponseResult getEmployeeById(@PathVariable("id") int id) { return ResponseResult.success(employeeService.getById(id)); } @GetMapping("/ehcaChePut") public String put(String key, String value) { mapEhcaChe.put(key, value); return "success"; } @GetMapping("/get") public String get(String key) { return mapEhcaChe.get(key); } }
26.912281
71
0.734681
f316981da0bad9e4a09c8079d2adc62159929e7f
588
package io.leopard.boot.util; import java.util.Date; import org.junit.Test; public class StatDateUtilTest { @Test public void getStartTime() { Date date = StatDateUtil.getStartTime(-7); System.out.println(DateTime.getTime(date)); } @Test public void getEndTime() { Date date = StatDateUtil.getEndTime(0); System.out.println(DateTime.getTime(date)); } @Test public void test() { Date start = StatDateUtil.getStartTime(-7); Date end = StatDateUtil.getEndTime(0); int dayCount = DateUtil.getDayCount(start, end); System.out.println("dayCount:" + dayCount); } }
21
50
0.719388
ec9dd6adfe2d100e4f31a91f2372b082fdf59183
1,186
/* * Copyright 2011 Benjamin Glatzel <benjamin.glatzel@me.com>. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.terasology.rendering.gui.components; import javax.vecmath.Vector2f; import org.lwjgl.opengl.Display; import org.terasology.rendering.gui.framework.UIGraphicsElement; /** * Transparent fullscreen overlay. * * @author Benjamin Glatzel <benjamin.glatzel@me.com> */ public class UIImageOverlay extends UIGraphicsElement { public UIImageOverlay(String textureName) { super(textureName); } @Override public void update() { setSize(new Vector2f((float) Display.getWidth(), (float) Display.getHeight())); } }
30.410256
87
0.733558
131ed03e8251c5fc54e81bc4ae00291b57044528
2,133
package maspack.properties; import maspack.properties.*; /** * Template showing how to define properties within a class */ public class PropertyTemplate implements HasProperties { // property attribute variables public static final String DEFAULT_TEXT = null; protected String myText = DEFAULT_TEXT; public static final boolean DEFAULT_ACTIVE = false; protected boolean myActive = DEFAULT_ACTIVE; public static final double DEFAULT_SCALE = 1.0; protected double myScale = DEFAULT_SCALE; protected PropertyMode myScaleMode; // static property definitions public static PropertyList myProps = new PropertyList (PropertyTemplate.class /*, ParentClass.class*/); static { myProps.addReadOnly ( "status", "a readonly integer"); myProps.add ( "text", "a text string", DEFAULT_TEXT); myProps.add ( "active isActive *", "a boolean predicate", DEFAULT_ACTIVE); myProps.addInheritable ( "scale", "a scale value with a range", DEFAULT_SCALE, "[0,2]"); } public PropertyList getAllPropertyInfo() { return myProps; } public Property getProperty (String name) { return PropertyList.getProperty (name, this); } // property accessor methods public int getStatus() { return 7; } public String getText() { return myText; } public void setText (String text) { myText = text; } public boolean isActive() { return myActive; } public void setActive (boolean active) { myActive = active; } public double getScale() { return myScale; } public void setScale (double scale) { myScale = scale; myScaleMode = PropertyUtils.propagateValue (this, "scale", myScale, myScaleMode); } public PropertyMode getScaleMode() { return myScaleMode; } public void setScaleMode (PropertyMode mode) { myScaleMode = PropertyUtils.setModeAndUpdate (this, "scale", myScaleMode, mode); } public static void main (String[] args) { PropertyTemplate template = new PropertyTemplate(); } }
23.7
76
0.663854
2bc5db0897abd87537c0a10fae3b1b06c16add59
2,425
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * The interfaces provided are listed below, along with usage samples. * * <p>======================= StorageClient ======================= * * <p>Service Description: ## API Overview and Naming Syntax * * <p>The GCS gRPC API allows applications to read and write data through the abstractions of * buckets and objects. For a description of these abstractions please see * https://cloud.google.com/storage/docs. * * <p>Resources are named as follows: - Projects are referred to as they are defined by the Resource * Manager API, using strings like `projects/123456` or `projects/my-string-id`. - Buckets are named * using string names of the form: `projects/{project}/buckets/{bucket}` For globally unique * buckets, `_` may be substituted for the project. - Objects are uniquely identified by their name * along with the name of the bucket they belong to, as separate strings in this API. For example: * * <p>ReadObjectRequest { bucket: 'projects/_/buckets/my-bucket' object: 'my-object' } Note that * object names can contain `/` characters, which are treated as any other character (no special * directory semantics). * * <p>Sample for StorageClient: * * <pre>{@code * try (StorageClient storageClient = StorageClient.create()) { * StartResumableWriteRequest request = * StartResumableWriteRequest.newBuilder() * .setWriteObjectSpec(WriteObjectSpec.newBuilder().build()) * .setCommonObjectRequestParams(CommonObjectRequestParams.newBuilder().build()) * .setCommonRequestParams(CommonRequestParams.newBuilder().build()) * .build(); * StartResumableWriteResponse response = storageClient.startResumableWrite(request); * } * }</pre> */ @Generated("by gapic-generator-java") package com.google.storage.v2; import javax.annotation.Generated;
43.303571
100
0.716701
a16623fdfad4bbf6177aec80b18078c5f8d5188e
772
package com.cloud.api.response; import com.cloud.api.ApiConstants; import com.cloud.api.BaseResponse; import com.cloud.serializer.Param; import java.util.List; import com.google.gson.annotations.SerializedName; public class GpuResponse extends BaseResponse { @SerializedName(ApiConstants.GPUGROUPNAME) @Param(description = "GPU cards present in the host") private String gpuGroupName; @SerializedName(ApiConstants.VGPU) @Param(description = "the list of enabled vGPUs", responseObject = VgpuResponse.class) private List<VgpuResponse> vgpu; public void setGpuGroupName(final String gpuGroupName) { this.gpuGroupName = gpuGroupName; } public void setVgpu(final List<VgpuResponse> vgpu) { this.vgpu = vgpu; } }
26.62069
90
0.743523
d1435b8a437a27d304f81bf4557a796244e741f5
3,618
package com.paragon_software.sound_manager; import android.content.Context; import android.provider.Settings; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.paragon_software.dictionary_manager.Dictionary; import com.paragon_software.native_engine.EngineSoundAPI; import com.paragon_software.native_engine.data.SoundData; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.observers.DisposableSingleObserver; import io.reactivex.schedulers.Schedulers; import java.nio.charset.StandardCharsets; import java.util.UUID; public class SlovosoundOnlineSound implements OnlineSoundApi { public static class SlovosoundOnlineFactory implements OnlineSoundApi.Factory { private Context mContext; private EngineSoundAPI mEngineSound; @Override public OnlineSoundApi create() { return new SlovosoundOnlineSound(mContext, mEngineSound) ; } @Override public Factory registerContext(@Nullable Context context) { mContext = context; return this; } @Override public Factory registerEngineSound(@Nullable EngineSoundAPI engineSound) { mEngineSound = engineSound; return this; } } private final Context mContext; private SlovosoundOnlineSoundService mOnlineSoundService; private final static String PROTOCOL = "1"; @NonNull private final EngineSoundAPI mEngineSound; SlovosoundOnlineSound(Context context, @NonNull EngineSoundAPI engineSound) { mOnlineSoundService = SlovosoundOnlineSoundService.create(); mEngineSound = engineSound; mContext = context; } @Override public void play(Dictionary.DictionaryId dictionaryId, String soundBaseIdx, String soundKey, EngineSoundAPI.OnSoundReadyCallback callback) { String imei = getAndroidIdOrRandom(mContext); String checksum = getChecksum(PROTOCOL, soundBaseIdx.toUpperCase(), Utils.getSoundBaseVersion(dictionaryId, soundBaseIdx), soundKey, imei); mOnlineSoundService.getSoundData(PROTOCOL, soundBaseIdx.toUpperCase(), Utils.getSoundBaseVersion(dictionaryId, soundBaseIdx), soundKey, imei, checksum) .map(responseBody -> mEngineSound.getSoundDataFromSpxSynch(dictionaryId, responseBody.bytes())) .subscribeOn(Schedulers.computation()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new DisposableSingleObserver<SoundData>() { @Override public void onSuccess(SoundData soundData) { callback.onSoundReady(soundData); dispose(); } @Override public void onError(Throwable e) { e.printStackTrace(); dispose(); } }); } private static String getAndroidIdOrRandom(Context context) { try { final String androidId = Settings.Global.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); if (androidId != null && !"9774d56d682e549c".equals(androidId)) {// bug 2.2 return UUID.nameUUIDFromBytes(androidId.getBytes(StandardCharsets.UTF_8)).toString(); } else { return UUID.randomUUID().toString(); } } catch (Exception e) { return UUID.randomUUID().toString(); } } private String getChecksum(String protocol, String soundBaseIdx, String soundBaseVersion, String soundKey, String imei) { StringBuilder sb = new StringBuilder(); sb.append(protocol).append("::") .append(soundBaseIdx).append("::") .append(soundBaseVersion).append("::") .append(soundKey).append("::").append(imei); return Utils.getSig(sb.toString()); } }
35.126214
155
0.728303
84dfb292d1322d4e8d0d951f8973136f285bfe68
5,120
package lastassignment.items; import lastassignment.utils.Console; import lastassignment.Player; /** * @author Boris * @version 1.0 * * The Player can purchase/find a Map that can help with navigation. * The Map shows the player the layout of the Rooms on the first floor * * @see Item */ public class Map extends Item { public Map(String description) { super(description); } /** * The player looks at the Map and its printed out on the console. * This consists of a bunch of ASCII art. * * @param player The Player that uses the Map * @see Player */ @Override public void interact(Player player) { if (player.hasItem(this)) { Console.printLine("+---------------+---------------+--+-----------------+................................"); Console.printLine("| | | | Mechanical |................................"); Console.printLine("| West Break [ | [ Engineering |................................"); Console.printLine("| Room | ] [ Lab |................................"); Console.printLine("+---==---+-+==+-+ Atrium | | |................................"); Console.printLine("| Toilet |.|__|.| | +-----------------+----+--------------------------+"); Console.printLine("+--------+.|__|.| | | | |"); Console.printLine("...........|__|.| ] [ Lecture Room ] East Break Room |"); Console.printLine("...........|__|.| | | 512 | |"); Console.printLine("...........|__|.+---==---+--==--| +----------------------+==+-----------+----+==+---+"); Console.printLine("...........|__|..........| Meet | |......................| | | |"); Console.printLine("......+----+ |..........| Spot [ |......................| + Classroom | Organic |"); Console.printLine("......| |..........| | |......................| [ 200 | Chemistry |"); Console.printLine("......| |..........+--==--+==+-------------------+..| + | Lab |"); Console.printLine("......| To |.................| |..| | | |"); Console.printLine("......[ 2nd |.................| Lecture Room +--+ |-----------+ |"); Console.printLine("......| Floor |.................| 509 ] |...........| |"); Console.printLine("......| |.................+==+-------------------+--+ |...........+-----------+"); Console.printLine("......| |.................| [ |........................"); Console.printLine("......+----+__|.................[ +--+==+-----+.................."); Console.printLine("...........|__|.................[ +----==----+ |..| Toilet |.................."); Console.printLine("...........|__|.................| | Computer | R +--+==+-----+-----------------+"); Console.printLine("...........|__+-----------------+ | Room | e [ |"); Console.printLine("...........|__| Classroom | +----==----+ c +-------------------+---==----+"); Console.printLine("...........|__| 300 | e |...................| |"); Console.printLine("...........|__+-------===-------+ p +-------------------+ Staff |"); Console.printLine("...........| ] t | [ Room |"); Console.printLine("...........+--+-------===-------+ i [ +---==----+"); Console.printLine("..............| Nano-technology | o [ | |"); Console.printLine("..............| Lab | n | Cafeteria [ Kitchen |"); Console.printLine("..............+-----------------+ | | |"); Console.printLine("................................+-----+---====---+-----+ +---------+"); Console.printLine("......................................| Entrance |.....| |.........."); Console.printWithPause("......................................+---====---+.....+-------------------+.........."); } else { Console.printWithPause("You pick up the %s", getDescription()); Console.printWithPause("It will definitely come in handy"); player.addItemToBackpack(this); } } }
72.112676
126
0.272461
acd4d2393e64dbc2ed60b6368e06665b8270d0ba
184
package com.solvd.airport.interfaces; public interface IFlyable { void setInstruments(); boolean takeOffRequest(); void setTakeOffPower(); void setGearUp(); }
20.444444
38
0.684783
03707c06a344a3d6a9841a8e1a5bfd3888f8792d
2,633
package com.dewarim.cinnamon.test.integration; import com.dewarim.cinnamon.api.UrlMapping; import com.dewarim.cinnamon.model.ProviderType; import com.dewarim.cinnamon.model.request.config.ListConfigRequest; import com.dewarim.cinnamon.model.response.ConfigWrapper; import org.apache.http.HttpResponse; import org.junit.jupiter.api.Test; import java.io.IOException; import static org.junit.jupiter.api.Assertions.*; public class ConfigServletIntegrationTest extends CinnamonIntegrationTest { @Test public void listConfig() throws IOException { HttpResponse response = sendStandardRequest(UrlMapping.CONFIG__LIST_ALL_CONFIGURATIONS, new ListConfigRequest()); ConfigWrapper config = parseResponse(response); assertFalse(config.getAcls().isEmpty()); assertFalse(config.getFolderTypes().isEmpty()); assertFalse(config.getFormats().isEmpty()); assertFalse(config.getGroups().isEmpty()); assertFalse(config.getIndexItems().isEmpty()); assertFalse(config.getLanguages().isEmpty()); assertFalse(config.getLifecycles().isEmpty()); assertFalse(config.getMetasetTypes().isEmpty()); assertFalse(config.getObjectTypes().isEmpty()); assertFalse(config.getObjectTypes().isEmpty()); assertFalse(config.getPermissions().isEmpty()); assertFalse(config.getRelationTypes().isEmpty()); assertFalse(config.getUiLanguages().isEmpty()); assertFalse(config.getUsers().isEmpty()); assertFalse(config.getProviderClasses().isEmpty()); assertTrue(config.getProviderClasses().stream().anyMatch(providerClass -> providerClass.getProviderType().equals(ProviderType.CONTENT_PROVIDER))); assertTrue(config.getProviderClasses().stream().anyMatch(providerClass -> providerClass.getProviderType().equals(ProviderType.LOGIN_PROVIDER))); assertTrue(config.getProviderClasses().stream().anyMatch(providerClass -> providerClass.getProviderType().equals(ProviderType.STATE_PROVIDER))); // note: actual configuration items will be tested in their own servlet integration tests. // debug output: (note: this will cause the complete test suite to stop for unknown reasons. // mapper.enable(SerializationFeature.INDENT_OUTPUT); // mapper.writeValue(System.out, config); } private ConfigWrapper parseResponse(HttpResponse response) throws IOException { assertResponseOkay(response); ConfigWrapper wrapper = mapper.readValue(response.getEntity().getContent(), ConfigWrapper.class); assertNotNull(wrapper); return wrapper; } }
46.192982
154
0.738321
6cb1a0efea26fbc194f10e20d198744d0ed471a5
10,613
package uk.nhs.nhsx.highriskvenuesupload; import com.google.common.base.Strings; import uk.nhs.nhsx.core.DateFormatValidator; import uk.nhs.nhsx.core.Jackson; import uk.nhs.nhsx.highriskvenuesupload.model.HighRiskVenue; import uk.nhs.nhsx.highriskvenuesupload.model.HighRiskVenues; import uk.nhs.nhsx.highriskvenuesupload.model.RiskyWindow; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import static uk.nhs.nhsx.core.DateFormatValidator.DATE_TIME_PATTERN; public class HighRiskVenueCsvParser { private static final String VENUE_CSV_ROW_FORMAT = "\\s*\"(?<venueId>[\\w\\-]+)\"\\s*,\\s*\"(?<startTime>[\\w.:\\-,/_]+)\"\\s*,\\s*\"(?<endTime>[\\w.:\\-,/_]+)\"\\s*"; private static final String VENUE_CSV_ROW_MESSAGE_TYPE_FORMAT = "\\s*\"(?<venueId>[\\w\\-]+)\"\\s*,\\s*\"(?<startTime>[\\w.:\\-,/_]+)\"\\s*,\\s*\"(?<endTime>[\\w.:\\-,/_]+)\"\\s*,\\s*\"(?<messageType>[\\w.:\\-,/_]+)\"\\s*,\\s*\"(?<optionalParameter>[\\w ]*)\"\\s*"; private static final String VENUE_CSV_HEADER_FORMAT = "\\s*#\\s*(?<venueIdColumnHeader>\\w+)\\s*,\\s*(?<startTimeColumnHeader>\\w+)\\s*,\\s*(?<endTimeColumnHeader>\\w+)\\s*"; private static final String VENUE_CSV_HEADER_MESSAGE_TYPE_FORMAT = "\\s*#\\s*(?<venueIdColumnHeader>\\w+)\\s*,\\s*(?<startTimeColumnHeader>\\w+)\\s*,\\s*(?<endTimeColumnHeader>\\w+)\\s*,\\s*(?<messageTypeColumnHeader>\\w+)\\s*,\\s*(?<optionalParameterColumnHeader>\\w+)\\s*"; private static final Pattern VENUE_CSV_ROW_PATTERN = Pattern.compile(VENUE_CSV_ROW_FORMAT); private static final Pattern VENUE_CSV_ROW_MESSAGE_TYPE_PATTERN = Pattern.compile(VENUE_CSV_ROW_MESSAGE_TYPE_FORMAT); private static final Pattern VENUE_CSV_HEADER_PATTERN = Pattern.compile(VENUE_CSV_HEADER_FORMAT); private static final Pattern VENUE_CSV_HEADER_MESSAGE_TYPE_PATTERN = Pattern.compile(VENUE_CSV_HEADER_MESSAGE_TYPE_FORMAT); private static final String VENUE_ID_FORMAT = "[CDEFHJKMPRTVWXY2345689]*"; private static final Pattern VENUE_ID_PATTERN = Pattern.compile(VENUE_ID_FORMAT); private static final int VENUE_ID_MAX_LENGTH = 12; private static final String MESSAGE_TYPE_FORMAT = "M\\d"; private static final Pattern MESSAGE_TYPE_PATTERN = Pattern.compile(MESSAGE_TYPE_FORMAT); private static final String CSV_HEADER_VENUE_ID = "venue_id"; private static final String CSV_HEADER_START_TIME = "start_time"; private static final String CSV_HEADER_END_TIME = "end_time"; private static final String CSV_HEADER_MESSAGE_TYPE = "message_type"; private static final String CSV_HEADER_OPTIONAL_PARAMETER = "optional_parameter"; private static final String DEFAULT_MESSAGE_TYPE = "M1"; private static final String DEFAULT_OPTIONAL_PARAMETER = ""; private static final int CSV_CONTENT_MAX_SIZE = 1048576; private static boolean messageTypeFeatureFlag; private static List<String> MESSAGE_TYPES_WITH_OPTIONAL_PARAMETER = List.of("M3"); public HighRiskVenueCsvParser() { this(false); } public HighRiskVenueCsvParser(boolean messageTypeFeatureFlag) { HighRiskVenueCsvParser.messageTypeFeatureFlag = messageTypeFeatureFlag; } public VenuesParsingResult toJson(String csv) { try { HighRiskVenues riskyVenues = HighRiskVenueCsvParser.parse(csv); return VenuesParsingResult.ok(Jackson.toJson(riskyVenues)); } catch (VenuesParsingException e) { return VenuesParsingResult.failure(e.getMessage()); } } private static HighRiskVenues parse(String csv) { if (Strings.isNullOrEmpty(csv) || csv.trim().isEmpty()) throwParsingExceptionWith("No payload"); if (csv.getBytes().length > CSV_CONTENT_MAX_SIZE) throwParsingExceptionWith("Csv content is more than 1MB"); String[] rows = csv.split("\\r?\\n"); List<HighRiskVenue> venues = new ArrayList<>(); if (messageTypeFeatureFlag) { validateHeaderRowWithMessageType(rows[0]); for (int i = 1; i < rows.length; i++) { VenueRisk venueIdRisk = parseRow(rows[i], i + 1, VENUE_CSV_ROW_MESSAGE_TYPE_PATTERN); RiskyWindow riskyWindow = new RiskyWindow(venueIdRisk.startTime, venueIdRisk.endTime); HighRiskVenue highRiskVenue = new HighRiskVenue(venueIdRisk.venueId, riskyWindow, venueIdRisk.messageType, venueIdRisk.optionalParameter); venues.add(highRiskVenue); } } else { validateHeaderRow(rows[0]); for (int i = 1; i < rows.length; i++) { VenueRisk venueIdRisk = parseRow(rows[i], i + 1, VENUE_CSV_ROW_PATTERN); RiskyWindow riskyWindow = new RiskyWindow(venueIdRisk.startTime, venueIdRisk.endTime); HighRiskVenue highRiskVenue = new HighRiskVenue(venueIdRisk.venueId, riskyWindow); venues.add(highRiskVenue); } } // TODO: check if date ranges overlap for the same venue id return new HighRiskVenues(venues); } private static class VenueRisk { final String venueId; final String startTime; final String endTime; final String messageType; final String optionalParameter; VenueRisk(String venueId, String startTime, String endTime) { this(venueId, startTime, endTime, DEFAULT_MESSAGE_TYPE, DEFAULT_OPTIONAL_PARAMETER); } VenueRisk(String venueId, String startTime, String endTime, String messageType, String optionalParameter) { checkRiskyWindow(startTime, endTime); checkVenueId(venueId); checkMessageType(messageType, optionalParameter); this.venueId = venueId; this.startTime = startTime; this.endTime = endTime; this.messageType = messageType; this.optionalParameter = optionalParameter; } private void checkMessageType(String messageType, String optionalParameter) { Matcher matcher = MESSAGE_TYPE_PATTERN.matcher(messageType); if (!matcher.matches()) { throwParsingExceptionWith("Invalid characters on the messageType: " + messageType); } if (!MESSAGE_TYPES_WITH_OPTIONAL_PARAMETER.contains(messageType) && !Strings.isNullOrEmpty(optionalParameter)) { throwParsingExceptionWith(String.format("Message type %s does not support optional parameter", messageType)); } if (MESSAGE_TYPES_WITH_OPTIONAL_PARAMETER.contains(messageType) && Strings.isNullOrEmpty(optionalParameter)) { throwParsingExceptionWith(String.format("Message type %s must include an optional parameter", messageType)); } } private void checkRiskyWindow(String startTime, String endTime) { ZonedDateTime startDateTime = DateFormatValidator .toZonedDateTimeMaybe(startTime) .orElseThrow(() -> parsingExceptionWith( "Date " + startTime + " did not conform to expected format " + DATE_TIME_PATTERN ) ); ZonedDateTime endDateTime = DateFormatValidator .toZonedDateTimeMaybe(endTime) .orElseThrow(() -> parsingExceptionWith( "Date " + endTime + " did not conform to expected format " + DATE_TIME_PATTERN ) ); if (endDateTime.isBefore(startDateTime)) { throwParsingExceptionWith("Start date must be <= end date"); } } private void checkVenueId(String venueId) { if (venueId.length() > VENUE_ID_MAX_LENGTH) { throwParsingExceptionWith("Length of VenueId is greater than " + VENUE_ID_MAX_LENGTH + " characters"); } Matcher matcher = VENUE_ID_PATTERN.matcher(venueId); if (!matcher.matches()) { throwParsingExceptionWith("Invalid characters on the venueId: " + venueId); } } } private static VenueRisk parseRow(String dataRow, Integer row, Pattern pattern) { Matcher matcher = pattern.matcher(dataRow); if (!matcher.matches()) { throwParsingExceptionWith("Invalid data row on line number: " + row); } String venueId = matcher.group("venueId"); String startTime = matcher.group("startTime"); String endTime = matcher.group("endTime"); if (!pattern.equals(VENUE_CSV_ROW_MESSAGE_TYPE_PATTERN)) { return new VenueRisk(venueId, startTime, endTime); } String messageType = matcher.group("messageType"); String optionalParameter = matcher.group("optionalParameter"); return new VenueRisk(venueId, startTime, endTime, messageType, optionalParameter); } private static void validateHeaderRow(String headerRow) { Matcher matcher = VENUE_CSV_HEADER_PATTERN.matcher(headerRow); if (!matcher.matches()) { throwParsingExceptionWith("Invalid header"); } if (!CSV_HEADER_VENUE_ID.equals(matcher.group("venueIdColumnHeader")) || !CSV_HEADER_START_TIME.equals(matcher.group("startTimeColumnHeader")) || !CSV_HEADER_END_TIME.equals(matcher.group("endTimeColumnHeader"))) { throwParsingExceptionWith("Invalid header"); } } private static void validateHeaderRowWithMessageType(String headerRow) { Matcher matcher = VENUE_CSV_HEADER_MESSAGE_TYPE_PATTERN.matcher(headerRow); if (!matcher.matches()) { throwParsingExceptionWith("Invalid header"); } if (!CSV_HEADER_VENUE_ID.equals(matcher.group("venueIdColumnHeader")) || !CSV_HEADER_START_TIME.equals(matcher.group("startTimeColumnHeader")) || !CSV_HEADER_END_TIME.equals(matcher.group("endTimeColumnHeader")) || !CSV_HEADER_MESSAGE_TYPE.equals(matcher.group("messageTypeColumnHeader")) || !CSV_HEADER_OPTIONAL_PARAMETER.equals(matcher.group("optionalParameterColumnHeader"))) { throwParsingExceptionWith("Invalid header"); } } private static void throwParsingExceptionWith(String reason) { throw parsingExceptionWith(reason); } private static VenuesParsingException parsingExceptionWith(String reason) { return new VenuesParsingException("validation error: " + reason); } }
48.683486
279
0.667106
8d8d183ad74fd92a06457a867653aee83c3ba642
1,814
package com.namelessmc.plugin.spigot.hooks; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import com.namelessmc.java_api.NamelessAPI; import com.namelessmc.java_api.NamelessException; import com.namelessmc.java_api.NamelessUser; import com.namelessmc.plugin.spigot.Config; import com.namelessmc.plugin.spigot.NamelessPlugin; public class PlaceholderCacher implements Runnable { static final Map<UUID, Integer> CACHED_NOTIFICATION_COUNT = new HashMap<>(); // TODO Remove player when they leave the server? @SuppressWarnings("InfiniteLoopStatement") @Override public void run() { try { final int delay = NamelessPlugin.getInstance().getConfig().getInt("placeholders-request-delay", 2000); while (true) { //noinspection BusyWait Thread.sleep(500); // In case no players are online, wait in between checking for online players final Optional<NamelessAPI> optApi = NamelessPlugin.getInstance().getNamelessApi(); if (optApi.isPresent()) { final NamelessAPI api = optApi.get(); for (final Player player : Bukkit.getOnlinePlayers()) { //noinspection BusyWait Thread.sleep(delay); try { final Optional<NamelessUser> user = NamelessPlugin.getInstance().getApiProvider().useUuids() ? api.getUser(player.getUniqueId()) : api.getUser(player.getName()); if (!user.isPresent()) { continue; } final int notificationCount = user.get().getNotificationCount(); CACHED_NOTIFICATION_COUNT.put(player.getUniqueId(), notificationCount); } catch (final NamelessException e) { e.printStackTrace(); } } } } } catch (final InterruptedException e) { e.printStackTrace(); } } }
32.981818
127
0.719405
832f68da3a5764a9e33c226794d42cd6a1f19505
1,884
package com.pokemon.spritedex.model.pojo; import java.util.ArrayList; import java.util.List; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class HeldItem implements Parcelable { @SerializedName("item") @Expose private Item item; @SerializedName("version_details") @Expose private List<VersionDetail> versionDetails = new ArrayList<VersionDetail>(); public final static Parcelable.Creator<HeldItem> CREATOR = new Creator<HeldItem>() { @SuppressWarnings({ "unchecked" }) public HeldItem createFromParcel(Parcel in) { HeldItem instance = new HeldItem(); instance.item = ((Item) in.readValue((Item.class.getClassLoader()))); in.readList(instance.versionDetails, (VersionDetail.class.getClassLoader())); return instance; } public HeldItem[] newArray(int size) { return (new HeldItem[size]); } } ; /** * * @return * The item */ public Item getItem() { return item; } /** * * @param item * The item */ public void setItem(Item item) { this.item = item; } /** * * @return * The versionDetails */ public List<VersionDetail> getVersionDetails() { return versionDetails; } /** * * @param versionDetails * The version_details */ public void setVersionDetails(List<VersionDetail> versionDetails) { this.versionDetails = versionDetails; } public void writeToParcel(Parcel dest, int flags) { dest.writeValue(item); dest.writeList(versionDetails); } public int describeContents() { return 0; } }
21.655172
89
0.601911
f0619585c121c98b78f6beabd871ad335157f28e
588
// Copyright (c) 2019, Oracle Corporation and/or its affiliates. All rights reserved. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. package oracle.kubernetes.operator; import java.net.Authenticator; import java.net.PasswordAuthentication; class MyTestAuthenticator extends Authenticator { public PasswordAuthentication getPasswordAuthentication() { String username = BaseTest.getUsername(); String password = BaseTest.getPassword(); return (new PasswordAuthentication(username, password.toCharArray())); } }
36.75
105
0.784014
dd18e864219b902893c06d78d9a76958a690a94b
462
package com.springboot.angular.app; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ImportResource; /** * Main class to start the app */ @ImportResource("classpath:/aop-config.xml") @SpringBootApplication public class UsersApplication { public static void main(String[] args) { SpringApplication.run(UsersApplication.class, args); } }
25.666667
68
0.805195
2565ec0dc26070a52a7c9c9bcdfb92e29567b15d
1,137
package com.users.jpa.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.users.jpa.Account; @Repository public interface AccountRepository extends JpaRepository<Account, Long>, JpaSpecificationExecutor<Account> { Account findByUsername(final String username); List<Account> findByClientId(final String clientId); @Modifying @Transactional @Query("update Account a set a.password = ?1 where a.username = ?2") int setFixedPasswordFor(String password, String username); @Modifying @Transactional @Query("delete from Account a where a.username = ?1") int deleteAccount(String username); @Query(value = "select * from account a where a.clientId = ?1 order by creationTime ASC LIMIT 1", nativeQuery = true) Account findUsersOrderByCreationTime(String clientId); }
34.454545
118
0.808267
79fc2985560ca59e4e5bbe9f4379689c2c3ef4f1
2,716
package de.ami.team1.generator; import com.sun.istack.NotNull; import com.sun.istack.Nullable; import de.ami.team1.pojo.RawMovementPojo; import de.ami.team1.util.BigCity; import de.ami.team1.util.RandomHelper; import java.time.LocalDateTime; /** * Generates a random Movement point, which may be used for simulating infectious events */ public class DataPointGenerator { //this is roughly lower saxony and surroundings private final static double topLeftLat = 53.6612; private final static double topLeftLong = 7.30505; private final static double botRightLat = 51.58678; private final static double botRightLong = 11.19027; //max distance in coordinates private final static double maxDistance = 0.002; /** * Generates a Movementpoint, which is in the relative distance of previous movementpoint, if this creates * @param id id of the User for whom the datapoint will be created * @param prevMov nullable previous movementpoint * @return RawMovementPojo with random data */ public static RawMovementPojo generateRandomPointAndTime(@NotNull Long id, @Nullable RawMovementPojo prevMov) { if (prevMov == null) { //first movement of the user double lat, lon; // 70% percent probability that the first movement starts in a city if (RandomHelper.hitPercentChance(70d)){ BigCity city = RandomHelper.getCityBasedOnPopulationProbability(); lat = RandomHelper.getDouble(city.getLatitude() - (maxDistance * 4), city.getLatitude() + (maxDistance * 4)); lon = RandomHelper.getDouble(city.getLongitude() - (maxDistance * 4), city.getLongitude() + (maxDistance * 4)); }else { // not a city -> totally random in roughly lower saxony lat = RandomHelper.getDouble(topLeftLat, botRightLat); lon = RandomHelper.getDouble(topLeftLong, botRightLong); } LocalDateTime timestamp = LocalDateTime.now().minusDays(365); timestamp = timestamp.plusSeconds(RandomHelper.getLong(0, 31536000)); return new RawMovementPojo(id, lat, lon, timestamp); } else { //generate data depending on a prev movement double lat = RandomHelper.getDouble(prevMov.getLatitude() - maxDistance, prevMov.getLatitude() + maxDistance); double lon = RandomHelper.getDouble(prevMov.getLongitude() - maxDistance, prevMov.getLongitude() + maxDistance); LocalDateTime timestamp = prevMov.getTimestamp().plusSeconds(RandomHelper.getLong(60, 86400)); return new RawMovementPojo(id, lat, lon, timestamp); } } }
43.111111
127
0.680044
b37de10854bae8b2a0efad0994bb6d71c6bfa7bc
13,131
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.twitter.distributedlog.service.tools; import com.google.common.util.concurrent.RateLimiter; import com.twitter.distributedlog.DLSN; import com.twitter.distributedlog.client.monitor.MonitorServiceClient; import com.twitter.distributedlog.client.serverset.DLZkServerSet; import com.twitter.distributedlog.service.ClientUtils; import com.twitter.distributedlog.service.DLSocketAddress; import com.twitter.distributedlog.service.DistributedLogClient; import com.twitter.distributedlog.service.DistributedLogClientBuilder; import com.twitter.distributedlog.tools.Tool; import com.twitter.finagle.builder.ClientBuilder; import com.twitter.finagle.thrift.ClientId$; import com.twitter.util.Await; import com.twitter.util.Duration; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.lang3.tuple.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; import java.net.URI; import java.util.ArrayList; import java.util.List; /** * Tools to interact with proxies. */ public class ProxyTool extends Tool { static final Logger logger = LoggerFactory.getLogger(ProxyTool.class); protected abstract static class ClusterCommand extends OptsCommand { protected Options options = new Options(); protected URI uri; protected final List<String> streams = new ArrayList<String>(); protected ClusterCommand(String name, String description) { super(name, description); options.addOption("u", "uri", true, "DistributedLog URI"); options.addOption("r", "prefix", true, "Prefix of stream name. E.g. 'QuantumLeapTest-'."); options.addOption("e", "expression", true, "Expression to generate stream suffix. " + "Currently we support range '0-9', list '1,2,3' and name '143'"); } @Override protected int runCmd(CommandLine commandLine) throws Exception { try { parseCommandLine(commandLine); } catch (ParseException pe) { System.err.println("ERROR: failed to parse commandline : '" + pe.getMessage() + "'"); printUsage(); return -1; } DLZkServerSet serverSet = DLZkServerSet.of(uri, 60000); logger.info("Created serverset for {}", uri); try { DistributedLogClient client = DistributedLogClientBuilder.newBuilder() .name("proxy_tool") .clientId(ClientId$.MODULE$.apply("proxy_tool")) .maxRedirects(2) .serverSet(serverSet.getServerSet()) .clientBuilder(ClientBuilder.get() .connectionTimeout(Duration.fromSeconds(2)) .tcpConnectTimeout(Duration.fromSeconds(2)) .requestTimeout(Duration.fromSeconds(10)) .hostConnectionLimit(1) .hostConnectionCoresize(1) .keepAlive(true) .failFast(false)) .build(); try { return runCmd(client); } finally { client.close(); } } finally { serverSet.close(); } } protected abstract int runCmd(DistributedLogClient client) throws Exception; @Override protected Options getOptions() { return options; } protected void parseCommandLine(CommandLine cmdline) throws ParseException { if (!cmdline.hasOption("u")) { throw new ParseException("No distributedlog uri provided."); } this.uri = URI.create(cmdline.getOptionValue("u")); // get stream names String streamPrefix = cmdline.hasOption("r") ? cmdline.getOptionValue("r") : ""; String streamExpression = null; if (cmdline.hasOption("e")) { streamExpression = cmdline.getOptionValue("e"); } if (null == streamPrefix || null == streamExpression) { throw new ParseException("Please specify stream prefix & expression."); } // parse the stream expression if (streamExpression.contains("-")) { // a range expression String[] parts = streamExpression.split("-"); if (parts.length != 2) { throw new ParseException("Invalid stream index range : " + streamExpression); } try { int start = Integer.parseInt(parts[0]); int end = Integer.parseInt(parts[1]); if (start > end) { throw new ParseException("Invalid stream index range : " + streamExpression); } for (int i = start; i <= end; i++) { streams.add(streamPrefix + i); } } catch (NumberFormatException nfe) { throw new ParseException("Invalid stream index range : " + streamExpression); } } else if (streamExpression.contains(",")) { // a list expression String[] parts = streamExpression.split(","); try { for (String part : parts) { streams.add(streamPrefix + part); } } catch (NumberFormatException nfe) { throw new ParseException("Invalid stream suffix list : " + streamExpression); } } else { streams.add(streamPrefix + streamExpression); } } } static class ReleaseCommand extends ClusterCommand { double rate = 100f; ReleaseCommand() { super("release", "Release Stream Ownerships"); options.addOption("t", "rate", true, "Rate to release streams"); } @Override protected void parseCommandLine(CommandLine cmdline) throws ParseException { super.parseCommandLine(cmdline); if (cmdline.hasOption("t")) { rate = Double.parseDouble(cmdline.getOptionValue("t", "100")); } } @Override protected int runCmd(DistributedLogClient client) throws Exception { RateLimiter rateLimiter = RateLimiter.create(rate); for (String stream : streams) { rateLimiter.acquire(); try { Await.result(client.release(stream)); System.out.println("Release ownership of stream " + stream); } catch (Exception e) { System.err.println("Failed to release ownership of stream " + stream); throw e; } } return 0; } @Override protected String getUsage() { return "release [options]"; } } static class TruncateCommand extends ClusterCommand { DLSN dlsn = DLSN.InitialDLSN; TruncateCommand() { super("truncate", "Truncate streams until given dlsn."); options.addOption("d", "dlsn", true, "DLSN to truncate until"); } @Override protected int runCmd(DistributedLogClient client) throws Exception { System.out.println("Truncating streams : " + streams); for (String stream : streams) { boolean success = Await.result(client.truncate(stream, dlsn)); System.out.println("Truncate " + stream + " to " + dlsn + " : " + success); } return 0; } @Override protected void parseCommandLine(CommandLine cmdline) throws ParseException { super.parseCommandLine(cmdline); if (!cmdline.hasOption("d")) { throw new ParseException("No DLSN provided"); } String[] dlsnStrs = cmdline.getOptionValue("d").split(","); if (dlsnStrs.length != 3) { throw new ParseException("Invalid DLSN : " + cmdline.getOptionValue("d")); } dlsn = new DLSN(Long.parseLong(dlsnStrs[0]), Long.parseLong(dlsnStrs[1]), Long.parseLong(dlsnStrs[2])); } @Override protected String getUsage() { return "truncate [options]"; } } protected abstract static class ProxyCommand extends OptsCommand { protected Options options = new Options(); protected InetSocketAddress address; protected ProxyCommand(String name, String description) { super(name, description); options.addOption("H", "host", true, "Single Proxy Address"); } @Override protected Options getOptions() { return options; } protected void parseCommandLine(CommandLine cmdline) throws ParseException { if (!cmdline.hasOption("H")) { throw new ParseException("No proxy address provided"); } address = DLSocketAddress.parseSocketAddress(cmdline.getOptionValue("H")); } @Override protected int runCmd(CommandLine commandLine) throws Exception { try { parseCommandLine(commandLine); } catch (ParseException pe) { System.err.println("ERROR: failed to parse commandline : '" + pe.getMessage() + "'"); printUsage(); return -1; } DistributedLogClientBuilder clientBuilder = DistributedLogClientBuilder.newBuilder() .name("proxy_tool") .clientId(ClientId$.MODULE$.apply("proxy_tool")) .maxRedirects(2) .host(address) .clientBuilder(ClientBuilder.get() .connectionTimeout(Duration.fromSeconds(2)) .tcpConnectTimeout(Duration.fromSeconds(2)) .requestTimeout(Duration.fromSeconds(10)) .hostConnectionLimit(1) .hostConnectionCoresize(1) .keepAlive(true) .failFast(false)); Pair<DistributedLogClient, MonitorServiceClient> clientPair = ClientUtils.buildClient(clientBuilder); try { return runCmd(clientPair); } finally { clientPair.getLeft().close(); } } protected abstract int runCmd(Pair<DistributedLogClient, MonitorServiceClient> client) throws Exception; } static class AcceptNewStreamCommand extends ProxyCommand { boolean enabled = false; AcceptNewStreamCommand() { super("accept-new-stream", "Enable/Disable accepting new streams for one proxy"); options.addOption("e", "enabled", true, "Enable/Disable accepting new streams"); } @Override protected void parseCommandLine(CommandLine cmdline) throws ParseException { super.parseCommandLine(cmdline); if (!cmdline.hasOption("e")) { throw new ParseException("No action 'enable/disable' provided"); } enabled = Boolean.parseBoolean(cmdline.getOptionValue("e")); } @Override protected int runCmd(Pair<DistributedLogClient, MonitorServiceClient> client) throws Exception { Await.result(client.getRight().setAcceptNewStream(enabled)); return 0; } @Override protected String getUsage() { return "accept-new-stream [options]"; } } public ProxyTool() { super(); addCommand(new ReleaseCommand()); addCommand(new TruncateCommand()); addCommand(new AcceptNewStreamCommand()); } @Override protected String getName() { return "proxy_tool"; } }
38.964392
115
0.573604
1dfae7bb7fec80e6f874881fcdc79dfe34b82c8a
669
package com.cocona.skyblockrei.data.definition; import com.google.gson.annotations.SerializedName; public class SkyblockItemDefinition { @SerializedName("internalname") public String internalName; @SerializedName("itemid") public String id; @SerializedName("displayname") public String displayName; @SerializedName("clickcommand") public String clickCommand; public int damage = 0; @SerializedName("nbttag") public String nbt = "{}"; @SerializedName("modver") public String modVersion; @SerializedName("lore") public String[] lore; @SerializedName("recipe") public SkyblockCraftingRecipe recipe; }
26.76
50
0.718984
c0084799093db9e15e2c5b672d9121dfeab4749c
7,222
/** * Copyright (c) 2008-2014 Ardor Labs, Inc. * * This file is part of Ardor3D. * * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ package com.ardor3d.extension.model.util; import com.ardor3d.math.ColorRGBA; import com.ardor3d.math.MathUtils; import com.ardor3d.renderer.state.BlendState; import com.ardor3d.renderer.state.MaterialState; /** * common material parameters */ public abstract class AbstractMaterial { private float ambientRed, ambientGreen, ambientBlue, ambientAlpha; private float diffuseRed, diffuseGreen, diffuseBlue, diffuseAlpha; private float emissiveRed, emissiveGreen, emissiveBlue, emissiveAlpha; private float specularRed, specularGreen, specularBlue, specularAlpha; private float shininess; private boolean forceBlend; protected AbstractMaterial() { super(); ambientRed = -1; ambientGreen = -1; ambientBlue = -1; ambientAlpha = -1; diffuseRed = -1; diffuseGreen = -1; diffuseBlue = -1; diffuseAlpha = -1; emissiveRed = -1; emissiveGreen = -1; emissiveBlue = -1; emissiveAlpha = -1; specularRed = -1; specularGreen = -1; specularBlue = -1; specularAlpha = -1; shininess = -1; } public BlendState getBlendState() { if (forceBlend || (ambientAlpha != -1 && ambientAlpha < 1.0f) || (diffuseAlpha != -1 && diffuseAlpha < 1.0f) || (emissiveAlpha != -1 && emissiveAlpha < 1.0f) || (specularAlpha != -1 && specularAlpha < 1.0f)) { final BlendState blend = new BlendState(); blend.setBlendEnabled(true); blend.setSourceFunction(BlendState.SourceFunction.SourceAlpha); blend.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); blend.setTestEnabled(true); blend.setTestFunction(BlendState.TestFunction.GreaterThan); blend.setReference(0); return blend; } return null; } public MaterialState getMaterialState() { if ((ambientRed != -1 && ambientGreen != -1 && ambientBlue != -1) || (diffuseRed != -1 && diffuseGreen != -1 && diffuseBlue != -1) || (emissiveRed != -1 && emissiveGreen != -1 && emissiveBlue != -1) || (specularRed != -1 && specularGreen != -1 && specularBlue != -1) || shininess != -1) { final MaterialState material = new MaterialState(); if (ambientRed != -1 && ambientGreen != -1 && ambientBlue != -1) { final float alpha = ambientAlpha == -1 ? 1 : MathUtils.clamp(ambientAlpha, 0, 1); material.setAmbient(new ColorRGBA(ambientRed, ambientGreen, ambientBlue, alpha)); } if (diffuseRed != -1 && diffuseGreen != -1 && diffuseBlue != -1) { final float alpha = diffuseAlpha == -1 ? 1 : MathUtils.clamp(diffuseAlpha, 0, 1); material.setDiffuse(new ColorRGBA(diffuseRed, diffuseGreen, diffuseBlue, alpha)); } if (emissiveRed != -1 && emissiveGreen != -1 && emissiveBlue != -1) { final float alpha = emissiveAlpha == -1 ? 1 : MathUtils.clamp(emissiveAlpha, 0, 1); material.setEmissive(new ColorRGBA(emissiveRed, emissiveGreen, emissiveBlue, alpha)); } if (specularRed != -1 && specularGreen != -1 && specularBlue != -1) { final float alpha = specularAlpha == -1 ? 1 : MathUtils.clamp(specularAlpha, 0, 1); material.setSpecular(new ColorRGBA(specularRed, specularGreen, specularBlue, alpha)); } if (shininess != -1) { material.setShininess(shininess); } return material; } return null; } public float getAmbientRed() { return ambientRed; } public void setAmbientRed(final float ambientRed) { this.ambientRed = ambientRed; } public float getAmbientGreen() { return ambientGreen; } public void setAmbientGreen(final float ambientGreen) { this.ambientGreen = ambientGreen; } public float getAmbientBlue() { return ambientBlue; } public void setAmbientBlue(final float ambientBlue) { this.ambientBlue = ambientBlue; } public float getDiffuseRed() { return diffuseRed; } public void setDiffuseRed(final float diffuseRed) { this.diffuseRed = diffuseRed; } public float getDiffuseGreen() { return diffuseGreen; } public void setDiffuseGreen(final float diffuseGreen) { this.diffuseGreen = diffuseGreen; } public float getDiffuseBlue() { return diffuseBlue; } public void setDiffuseBlue(final float diffuseBlue) { this.diffuseBlue = diffuseBlue; } public float getEmissiveRed() { return emissiveRed; } public void setEmissiveRed(final float emissiveRed) { this.emissiveRed = emissiveRed; } public float getEmissiveGreen() { return emissiveGreen; } public void setEmissiveGreen(final float emissiveGreen) { this.emissiveGreen = emissiveGreen; } public float getEmissiveBlue() { return emissiveBlue; } public void setEmissiveBlue(final float emissiveBlue) { this.emissiveBlue = emissiveBlue; } public float getSpecularRed() { return specularRed; } public void setSpecularRed(final float specularRed) { this.specularRed = specularRed; } public float getSpecularGreen() { return specularGreen; } public void setSpecularGreen(final float specularGreen) { this.specularGreen = specularGreen; } public float getSpecularBlue() { return specularBlue; } public void setSpecularBlue(final float specularBlue) { this.specularBlue = specularBlue; } public float getAmbientAlpha() { return ambientAlpha; } public void setAmbientAlpha(final float ambientAlpha) { this.ambientAlpha = ambientAlpha; } public float getDiffuseAlpha() { return diffuseAlpha; } public void setDiffuseAlpha(final float diffuseAlpha) { this.diffuseAlpha = diffuseAlpha; } public float getEmissiveAlpha() { return emissiveAlpha; } public void setEmissiveAlpha(final float emissiveAlpha) { this.emissiveAlpha = emissiveAlpha; } public float getSpecularAlpha() { return specularAlpha; } public void setSpecularAlpha(final float specularAlpha) { this.specularAlpha = specularAlpha; } public float getShininess() { return shininess; } public void setShininess(final float shininess) { this.shininess = shininess; } public boolean isForceBlend() { return forceBlend; } public void setForceBlend(final boolean forceBlend) { this.forceBlend = forceBlend; } }
29.477551
116
0.621296
57725dca96d56525153032c8b39aa769c5b8bf7a
585
package org.jfrog.artifactory.client.model.impl; import org.jfrog.artifactory.client.model.BuildNumber; /** * @author yahavi */ public class BuildNumberImpl implements BuildNumber { private String started; private String uri; @Override public String getUri() { return uri; } @Override public String getStarted() { return started; } @Override public String toString() { return "BuildNumberImpl{" + "started='" + started + '\'' + ", uri='" + uri + '\'' + '}'; } }
19.5
54
0.564103
d80f2c8a80f2ade8b0d639844ef5e3ff8cbca6f9
2,035
package jscip; /** Class representing a single variable (equivalent of SCIP_VAR).*/ public class Variable { private SWIGTYPE_p_SCIP_VAR _varptr; /** pointer address class created by SWIG */ /** default constructor */ public Variable(SWIGTYPE_p_SCIP_VAR varptr) { _varptr = varptr; } /** returns SWIG object type representing a SCIP_VAR pointer */ public SWIGTYPE_p_SCIP_VAR getPtr() { return _varptr; } // @todo this function should not be public public void setPtr(SWIGTYPE_p_SCIP_VAR varptr) { _varptr = varptr; } /** wraps SCIPvarGetName() */ public String getName() { assert(_varptr != null); return SCIPJNI.SCIPvarGetName(_varptr); } /** wraps SCIPvarGetType() */ public SCIP_Vartype getType() { assert(_varptr != null); return SCIPJNI.SCIPvarGetType(_varptr); } /** wraps SCIPvarGetLbLocal() */ public double getLbLocal() { assert(_varptr != null); return SCIPJNI.SCIPvarGetLbLocal(_varptr); } /** wraps SCIPvarGetUbLocal() */ public double getUbLocal() { assert(_varptr != null); return SCIPJNI.SCIPvarGetUbLocal(_varptr); } /** wraps SCIPvarGetLbGlobal() */ public double getLbGlobal() { assert(_varptr != null); return SCIPJNI.SCIPvarGetLbGlobal(_varptr); } /** wraps SCIPvarGetUbGlobal() */ public double getUbGlobal() { assert(_varptr != null); return SCIPJNI.SCIPvarGetUbGlobal(_varptr); } /** wraps SCIPvarGetObj() */ public double getObj() { assert(_varptr != null); return SCIPJNI.SCIPvarGetObj(_varptr); } /** wraps SCIPvarGetBranchPriority() */ public int getBranchPriority() { assert(_varptr != null); return SCIPJNI.SCIPvarGetBranchPriority(_varptr); } /** returns a String representation */ public String toString() { return getName() + " in [" + getLbLocal() + "," + getUbLocal() + "] obj = " + getObj() + " type = " + getType(); } }
23.125
118
0.63145
1e05d240a282ff43202d14bfc2cd6fc7f13646a4
3,984
package com.usal.jorgeav.sportapp.alarms.alarmdetail; import android.content.Context; import android.database.Cursor; import android.os.Bundle; import android.support.v4.app.LoaderManager; import com.google.android.gms.maps.model.LatLng; import com.usal.jorgeav.sportapp.BaseFragment; import com.usal.jorgeav.sportapp.data.Field; /** * Clase abstracta donde se declaran las interfaces por las que se comunican Vista y Presentador, * de la arquitectura utilizada Modelo - Vista - Presentador, para mostrar los detalles de alarmas. */ abstract class DetailAlarmContract { /** * Interfaz del Presentador con los métodos utilizados para comunicarse con él */ public interface Presenter { /** * Inicia el proceso de carga de la alarma de la base de datos * * @param loaderManager objeto {@link LoaderManager} utilizado para consultar el Proveedor * de Contenido * @param b contenedor de posibles parámetros utilizados en la consulta */ void openAlarm(LoaderManager loaderManager, Bundle b); /** * Inicia el proceso de borrado de la alarma de la base de datos cuyos detalles se están * mostrando * * @param b contenedor de posibles parámetros utilizados en el borrado */ void deleteAlarm(Bundle b); } /** * Interfaz de la Vista con los métodos utilizados para comunicarse con ella */ public interface View { /** * Invocado para mostrar el deporte en la interfaz * * @param sport identificador del deporte */ void showAlarmSport(String sport); /** * Invocado para mostrar el lugar de la alarma en la interfaz * * @param field instalación * @param city ciudad * @param coords coordenadas del lugar */ void showAlarmPlace(Field field, String city, LatLng coords); /** * Invocado para mostrar en la interfaz el rango de fechas en las que está establecida * la alarma * * @param dateFrom limite inferior del rango de fechas * @param dateTo limite superior del rango de fechas */ void showAlarmDate(Long dateFrom, Long dateTo); /** * Invocado para mostrar en la interfaz el rango de puestos totales establecidos para la * alarma * * @param totalPlayersFrom limite inferior del rango de puestos totales * @param totalPlayersTo limite superior del rango de puestos totales */ void showAlarmTotalPlayers(Long totalPlayersFrom, Long totalPlayersTo); /** * Invocado para mostrar en la interfaz el rango de puestos vacantes establecidos para la * alarma * * @param emptyPlayersFrom limite inferior del rango de puestos vacantes * @param emptyPlayersTo limite superior del rango de puestos vacantes */ void showAlarmEmptyPlayers(Long emptyPlayersFrom, Long emptyPlayersTo); /** * Invocado para mostrar en la interfaz los partidos encontrados que coinciden con la * alarma * * @param data conjunto de partidos encontrados en la base de datos */ void showEvents(Cursor data); /** * Invocado para limpiar los elementos de la interfaz de los datos especificados */ void clearUI(); /** * Invocado para obtener una referencia al {@link Context} de la Actividad contenedora * * @return Context de la Actividad contenedora */ Context getActivityContext(); /** * Invocado para obtener una referencia al {@link BaseFragment} que implementa este método * * * * @return BaseFragment que implementa este método */ BaseFragment getThis(); } }
34.344828
99
0.628765
c94a1f4c5eeacc7ea0692e0ad8cf2da5b8538340
10,258
/***************************************************************** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. ****************************************************************/ package org.apache.cayenne.dbsync.naming; import org.apache.cayenne.configuration.DataChannelDescriptor; import org.apache.cayenne.configuration.DataNodeDescriptor; import org.apache.cayenne.map.DataMap; import org.apache.cayenne.map.DbAttribute; import org.apache.cayenne.map.DbEntity; import org.apache.cayenne.map.DbRelationship; import org.apache.cayenne.map.Embeddable; import org.apache.cayenne.map.EmbeddableAttribute; import org.apache.cayenne.map.ObjAttribute; import org.apache.cayenne.map.ObjEntity; import org.apache.cayenne.map.ObjRelationship; import org.apache.cayenne.map.Procedure; import org.apache.cayenne.map.ProcedureParameter; import org.apache.cayenne.map.QueryDescriptor; import org.junit.Test; import static org.junit.Assert.assertEquals; public class NameBuilderTest { @Test public void testName_Root() { assertEquals("project", NameBuilder.builder(new DataChannelDescriptor()).name()); } @Test public void testName_DataChannelDescriptorContext() throws Exception { DataChannelDescriptor descriptor = new DataChannelDescriptor(); DataMap m0 = new DataMap(); m0.setName(NameBuilder.builder(m0).in(descriptor).name()); assertEquals("datamap", m0.getName()); descriptor.getDataMaps().add(m0); DataMap m1 = new DataMap(); m1.setName(NameBuilder.builder(m1).in(descriptor).name()); assertEquals("datamap1", m1.getName()); descriptor.getDataMaps().add(m1); DataNodeDescriptor nd0 = new DataNodeDescriptor(); nd0.setName(NameBuilder.builder(nd0).in(descriptor).name()); assertEquals("datanode", nd0.getName()); descriptor.getNodeDescriptors().add(nd0); DataNodeDescriptor nd1 = new DataNodeDescriptor(); nd1.setName(NameBuilder.builder(nd1).in(descriptor).name()); assertEquals("datanode1", nd1.getName()); descriptor.getNodeDescriptors().add(nd1); } @Test public void testName_DataMapContext() { DataMap map = new DataMap(); map.setDefaultPackage("com.foo"); DbEntity de0 = new DbEntity(); de0.setName(NameBuilder.builder(de0).in(map).name()); assertEquals("db_entity", de0.getName()); map.addDbEntity(de0); DbEntity de1 = new DbEntity(); de1.setName(NameBuilder.builder(de1).in(map).name()); assertEquals("db_entity1", de1.getName()); map.addDbEntity(de1); ObjEntity oe0 = new ObjEntity(); oe0.setName(NameBuilder.builder(oe0).in(map).name()); assertEquals("ObjEntity", oe0.getName()); map.addObjEntity(oe0); ObjEntity oe1 = new ObjEntity(); oe1.setName(NameBuilder.builder(oe1).in(map).name()); assertEquals("ObjEntity1", oe1.getName()); map.addObjEntity(oe1); ObjEntity oe2 = new ObjEntity(); oe2.setName(NameBuilder.builder(oe0).in(map).baseName("db_entity").name()); assertEquals("Should not conflict with similarly named DbEntity", "Db_entity", oe2.getName()); map.addObjEntity(oe2); Procedure p0 = new Procedure(); p0.setName(NameBuilder.builder(p0).in(map).name()); assertEquals("procedure", p0.getName()); map.addProcedure(p0); Procedure p1 = new Procedure(); p1.setName(NameBuilder.builder(p1).in(map).name()); assertEquals("procedure1", p1.getName()); map.addProcedure(p1); Procedure p2 = new Procedure(); p2.setName(NameBuilder.builder(p1).in(map).baseName("db_enity").name()); assertEquals("Should not conflict with similarly named DbEntity", "db_enity", p2.getName()); map.addProcedure(p2); QueryDescriptor q0 = QueryDescriptor.selectQueryDescriptor(); q0.setName(NameBuilder.builder(q0).in(map).name()); assertEquals("query", q0.getName()); map.addQueryDescriptor(q0); QueryDescriptor q1 = QueryDescriptor.ejbqlQueryDescriptor(); q1.setName(NameBuilder.builder(q1).in(map).name()); assertEquals("query1", q1.getName()); map.addQueryDescriptor(q1); Embeddable e0 = new Embeddable(); e0.setClassName("com.foo." + NameBuilder.builder(e0).in(map).name()); assertEquals("com.foo.Embeddable", e0.getClassName()); map.addEmbeddable(e0); Embeddable e1 = new Embeddable(); e1.setClassName("com.foo." + NameBuilder.builder(e1).in(map).name()); assertEquals("com.foo.Embeddable1", e1.getClassName()); map.addEmbeddable(e1); } @Test public void testName_ObjEntityContext() { ObjEntity entity = new ObjEntity(); entity.getCallbackMap().getPostAdd().addCallbackMethod("getMe"); ObjAttribute a0 = new ObjAttribute(); String na0 = NameBuilder.builder(a0).in(entity).name(); assertEquals("untitledAttr", na0); a0.setName(na0); entity.addAttribute(a0); ObjAttribute a1 = new ObjAttribute(); String na1 = NameBuilder.builder(a1).in(entity).name(); assertEquals("untitledAttr1", na1); a1.setName(na1); entity.addAttribute(a1); ObjAttribute a2 = new ObjAttribute(); String na2 = NameBuilder.builder(a2).in(entity).baseName("me").name(); assertEquals("Conflict with callback method was not detected", "me1", na2); a2.setName(na2); entity.addAttribute(a2); ObjRelationship r0 = new ObjRelationship(); String nr0 = NameBuilder.builder(r0).in(entity).name(); assertEquals("untitledRel", nr0); r0.setName(nr0); entity.addRelationship(r0); ObjRelationship r1 = new ObjRelationship(); String nr1 = NameBuilder.builder(r1).in(entity).name(); assertEquals("untitledRel1", nr1); r1.setName(nr1); entity.addRelationship(r1); } @Test public void testName_DbEntityContext() { DbEntity entity = new DbEntity(); DbAttribute a0 = new DbAttribute(); String na0 = NameBuilder.builder(a0).in(entity).name(); assertEquals("untitledAttr", na0); a0.setName(na0); entity.addAttribute(a0); DbAttribute a1 = new DbAttribute(); String na1 = NameBuilder.builder(a1).in(entity).name(); assertEquals("untitledAttr1", na1); a1.setName(na1); entity.addAttribute(a1); DbRelationship r0 = new DbRelationship(); String nr0 = NameBuilder.builder(r0).in(entity).name(); assertEquals("untitledRel", nr0); r0.setName(nr0); entity.addRelationship(r0); DbRelationship r1 = new DbRelationship(); String nr1 = NameBuilder.builder(r1).in(entity).name(); assertEquals("untitledRel1", nr1); r1.setName(nr1); entity.addRelationship(r1); } @Test public void testName_ProcedureContext() { Procedure procedure = new Procedure(); ProcedureParameter p0 = new ProcedureParameter(); p0.setName(NameBuilder.builder(p0).in(procedure).name()); assertEquals("UntitledProcedureParameter", p0.getName()); procedure.addCallParameter(p0); ProcedureParameter p1 = new ProcedureParameter(); p1.setName(NameBuilder.builder(p1).in(procedure).name()); assertEquals("UntitledProcedureParameter1", p1.getName()); procedure.addCallParameter(p1); } @Test public void testName_EmbeddableContext() { Embeddable embeddable = new Embeddable(); EmbeddableAttribute ea0 = new EmbeddableAttribute(); ea0.setName(NameBuilder.builder(ea0).in(embeddable).name()); assertEquals("untitledAttr", ea0.getName()); embeddable.addAttribute(ea0); EmbeddableAttribute ea1 = new EmbeddableAttribute(); ea1.setName(NameBuilder.builder(ea1).in(embeddable).name()); assertEquals("untitledAttr1", ea1.getName()); embeddable.addAttribute(ea1); } @Test public void testName_UncapitalizeAttributeNames() throws Exception { ObjEntity entity = new ObjEntity(); ObjAttribute a0 = new ObjAttribute(); String na0 = NameBuilder.builder(a0).in(entity).baseName("myName").name(); assertEquals("myName", na0); a0.setName(na0); entity.addAttribute(a0); ObjAttribute a1 = new ObjAttribute(); String na1 = NameBuilder.builder(a1).in(entity).baseName("MyName").name(); assertEquals("myName1", na1); a1.setName(na1); entity.addAttribute(a1); } @Test public void testName_Callbacks_ObjEntityContext() { ObjEntity entity = new ObjEntity(); String c0 = NameBuilder.builderForCallbackMethod(entity).name(); assertEquals("onEvent", c0); entity.getCallbackMap().getPostAdd().addCallbackMethod(c0); String c1 = NameBuilder.builderForCallbackMethod(entity).name(); assertEquals("onEvent1", c1); entity.getCallbackMap().getPostAdd().addCallbackMethod(c1); entity.addAttribute(new ObjAttribute("untitledAttr")); String c3 = NameBuilder.builderForCallbackMethod(entity).baseName("getUntitledAttr").name(); assertEquals("getUntitledAttr1", c3); entity.getCallbackMap().getPostAdd().addCallbackMethod(c3); } }
37.713235
102
0.656658
edad1c7353f6b89b3cc1223a19c6eaf28495015d
2,543
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.geometry.io.core.output; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class StreamGeometryOutputTest { private final ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); @Test void testCtor_stream() { // act final StreamGeometryOutput out = new StreamGeometryOutput(byteStream); // assert Assertions.assertNull(out.getFileName()); Assertions.assertNull(out.getCharset()); Assertions.assertEquals(byteStream, out.getOutputStream()); } @Test void testCtor_streamAndFileName() { // act final StreamGeometryOutput out = new StreamGeometryOutput(byteStream, "test.txt"); // assert Assertions.assertEquals("test.txt", out.getFileName()); Assertions.assertNull(out.getCharset()); Assertions.assertEquals(byteStream, out.getOutputStream()); } @Test void testCtor_allArgs() { // act final StreamGeometryOutput out = new StreamGeometryOutput(byteStream, "test.txt", StandardCharsets.UTF_16); // assert Assertions.assertEquals("test.txt", out.getFileName()); Assertions.assertEquals(StandardCharsets.UTF_16, out.getCharset()); Assertions.assertEquals(byteStream, out.getOutputStream()); } @Test void testToString() { // arrange final StreamGeometryOutput out = new StreamGeometryOutput(byteStream, "abc.txt"); // act final String result = out.toString(); // assert Assertions.assertEquals("StreamGeometryOutput[fileName= abc.txt]", result); } }
34.364865
115
0.703893
a9ab1631632b662aca0722cb4d5aad4ca560cf07
4,163
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * * * * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.iotcore.model; /** * customizedTemplateProduct */ public class CustomizedTemplateProduct implements java.io.Serializable { private static final long serialVersionUID = 1L; /** * 产品名称 */ private String productName; /** * 0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台 1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台 */ private Integer productType; /** * 产品Key */ private String productKey; /** * 创建时间,创建时间,时间为东八区(UTC/GMT+08:00) */ private Long createdTime; /** * 设备数 */ private Integer deviceCount; /** * get 产品名称 * * @return */ public String getProductName() { return productName; } /** * set 产品名称 * * @param productName */ public void setProductName(String productName) { this.productName = productName; } /** * get 0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台 1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台 * * @return */ public Integer getProductType() { return productType; } /** * set 0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台 1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台 * * @param productType */ public void setProductType(Integer productType) { this.productType = productType; } /** * get 产品Key * * @return */ public String getProductKey() { return productKey; } /** * set 产品Key * * @param productKey */ public void setProductKey(String productKey) { this.productKey = productKey; } /** * get 创建时间,创建时间,时间为东八区(UTC/GMT+08:00) * * @return */ public Long getCreatedTime() { return createdTime; } /** * set 创建时间,创建时间,时间为东八区(UTC/GMT+08:00) * * @param createdTime */ public void setCreatedTime(Long createdTime) { this.createdTime = createdTime; } /** * get 设备数 * * @return */ public Integer getDeviceCount() { return deviceCount; } /** * set 设备数 * * @param deviceCount */ public void setDeviceCount(Integer deviceCount) { this.deviceCount = deviceCount; } /** * set 产品名称 * * @param productName */ public CustomizedTemplateProduct productName(String productName) { this.productName = productName; return this; } /** * set 0:设备。设备不能挂载子设备。可以直连物联网平台,也可以作为网关的子设备连接物联网平台 1:网关。网关可以挂载子设备,具有子设备管理模块,维持子设备的拓扑关系,和将拓扑关系同步到物联网平台 * * @param productType */ public CustomizedTemplateProduct productType(Integer productType) { this.productType = productType; return this; } /** * set 产品Key * * @param productKey */ public CustomizedTemplateProduct productKey(String productKey) { this.productKey = productKey; return this; } /** * set 创建时间,创建时间,时间为东八区(UTC/GMT+08:00) * * @param createdTime */ public CustomizedTemplateProduct createdTime(Long createdTime) { this.createdTime = createdTime; return this; } /** * set 设备数 * * @param deviceCount */ public CustomizedTemplateProduct deviceCount(Integer deviceCount) { this.deviceCount = deviceCount; return this; } }
19.729858
76
0.605573
0fc2f29a3d3564b000e2f24e0491ac071cd7a2dd
216
package com.madg.io; import java.io.IOException; import java.io.InputStream; /** * @Author:Madg * @Date:2018/11/7/007 20:51 */ public interface IResource { InputStream getInputStream() throws IOException; }
15.428571
52
0.722222
1c83feff51cb29f2078afe8009c898219662b917
3,097
package org.evergreen.db.helper; import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLXML; import java.sql.Timestamp; public class ColumnUtils { /** * 处理数据类型的转换 * * @param rs * @param columnName * @param propType * @return * @throws SQLException */ public static Object columnConvert(ResultSet rs, String columnName, Class propType) throws SQLException { if (!propType.isPrimitive() && rs.getObject(columnName) == null) { return null; } Object value = null; if (propType.equals(String.class)) { value = rs.getString(columnName); } else if (value instanceof String && propType.isEnum()) { value = Enum.valueOf(propType.asSubclass(Enum.class), rs.getString(columnName)); } else if (propType.equals(Integer.TYPE) || propType.equals(Integer.class)) { value = rs.getInt(columnName); } else if (propType.equals(Boolean.TYPE) || propType.equals(Boolean.class)) { value = rs.getBoolean(columnName); } else if (propType.equals(Long.TYPE) || propType.equals(Long.class)) { value = rs.getLong(columnName); } else if (propType.equals(Double.TYPE) || propType.equals(Double.class)) { value = rs.getDouble(columnName); } else if (propType.equals(Float.TYPE) || propType.equals(Float.class)) { value = rs.getFloat(columnName); } else if (propType.equals(Short.TYPE) || propType.equals(Short.class)) { value = rs.getShort(columnName); } else if (propType.equals(Byte.TYPE) || propType.equals(Byte.class)) { value = rs.getByte(columnName); } else if (propType.equals(Character.TYPE) || propType.equals(Character.class)) { value = rs.getString(columnName).charAt(0); } else if (propType.equals(BigDecimal.class)) { value = rs.getBigDecimal(columnName); } else if (propType.equals(SQLXML.class)) { value = rs.getSQLXML(columnName); } else if (rs.getObject(columnName) instanceof java.util.Date) { //处理日期类型 value = convertDate(rs.getObject(columnName), propType); } return value; } /** * 将数据库的日期转换成java中的日期类型 */ private static Object convertDate(Object value, Class<?> paramType) { final String type = paramType.getName(); if ("java.sql.Date".equals(type)) { value = new java.sql.Date(((java.util.Date) value).getTime()); } else if ("java.sql.Time".equals(type)) { value = new java.sql.Time(((java.util.Date) value).getTime()); } else if ("java.sql.Timestamp".equals(type)) { Timestamp ts = (Timestamp) value; int nanos = ts.getNanos(); value = new java.sql.Timestamp(ts.getTime()); ((Timestamp) value).setNanos(nanos); } return value; } }
32.946809
92
0.585405
03a11c6fe3401cbd4e7434d56a372c5c5b7b277a
361
package polimorfismosAtvPrincipal; public class ContaCorrente extends Conta { @Override public double atualizaTaxaPercentual(double taxaPercentual) { double saldoConta = getSaldo(); double novoSaldo = ( ((2*taxaPercentual) * saldoConta ) / 100 )+ saldoConta; setSaldo(novoSaldo); return getSaldo(); } }
27.769231
84
0.65928
d89038e84496d255ee896ea3b3e3c6ca9918120e
421
package net.ancronik.cookbook.backend.api.web.dto.author; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.validator.constraints.CodePointLength; import javax.validation.constraints.NotBlank; @Data @NoArgsConstructor @AllArgsConstructor public class AuthorCreateRequest { @NotBlank @CodePointLength(min = 2, max = 12) private String username; }
21.05
59
0.80285
f4b14831d77693c353e707f49db9d4d73a26610e
5,494
package org.talend.mq.headers.rfh2; import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.ibm.mq.MQMessage; public class MQRFH2 { private final static String RFH2_FORMAT = "MQHRF2 "; private final static String STRUC_ID = "RFH "; private final static int STRUC_LENGTH = 36; private int version = 2; private int encoding = 546; private int codedCharSetId = 437; private String format = ""; private int flags = 0; private int nameValueCodedCharSetId = 1208; private int strucLength = 0; private List areas = new ArrayList(); public MQRFH2() { // default cstr } public MQRFH2(MQMessage msg) throws IOException { // create from message parseMessage(msg); } private void parseMessage(MQMessage msg) throws IOException { if (!RFH2_FORMAT.equals(msg.format)) { // no RFH2 header, skip return; } // skip strucid msg.seek(4); version = msg.readInt(); int strucLength = msg.readInt(); encoding = msg.readInt(); codedCharSetId = msg.readInt(); format = msg.readStringOfByteLength(8); flags = msg.readInt(); nameValueCodedCharSetId = msg.readInt(); // TODO: parse folders int remainLength = strucLength - STRUC_LENGTH; while(remainLength > 0) { int areaLen = msg.readInt(); byte[] b = new byte[areaLen]; msg.readFully(b); String areaAsString = new String(b, "UTF-8"); try { RFH2Area area = RFH2Area.parse(areaAsString); addArea(area); remainLength = remainLength - areaLen - 4; } catch (Exception e) { throw new RuntimeException("Failed to parse header", e); } } } public void toMessage(MQMessage msg) throws IOException { int areasLen = 0; List areaStrings = new ArrayList(); for (int i = 0; i<areas.size(); i++) { RFH2Area area = (RFH2Area) areas.get(i); String areaString = area.toString(); // add to length for prepending length int areasLen += 4; areasLen += areaString.getBytes("UTF-8").length; areaStrings.add(areaString); } msg.seek(0); msg.format = RFH2_FORMAT; msg.writeString(STRUC_ID); msg.writeInt(version); msg.writeInt(STRUC_LENGTH + areasLen); msg.writeInt(encoding); msg.writeInt(codedCharSetId); msg.writeString(pad(format, 8)); msg.writeInt(flags); msg.writeInt(nameValueCodedCharSetId); for (int i = 0; i<areaStrings.size(); i++) { String folderString = (String) areaStrings.get(i); msg.writeInt(folderString.getBytes("UTF-8").length); msg.write(folderString.getBytes("UTF-8")); } } private String pad(String s, int len) { StringBuffer sb = new StringBuffer(s); for(int i = s.length(); i<len; i++) { sb.append(' '); } return sb.toString(); } public void addArea(RFH2Area area) { areas.add(area); } public RFH2Area getArea(String areaName) { for (int i = 0; i<areas.size(); i++) { RFH2Area area = (RFH2Area) areas.get(i); if(area.getAreaName().equals(areaName)) { return area; } } // no area was found return null; } public RFH2Area[] getAllAreas() { return (RFH2Area[]) areas.toArray(new RFH2Area[0]); } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } public int getEncoding() { return encoding; } public void setEncoding(int encoding) { this.encoding = encoding; } public int getCodedCharSetId() { return codedCharSetId; } public void setCodedCharSetId(int codedCharSetId) { this.codedCharSetId = codedCharSetId; } public String getFormat() { return format; } public void setFormat(String format) { this.format = format; } public int getFlags() { return flags; } public void setFlags(int flags) { this.flags = flags; } public int getNameValueCodedCharSetId() { return nameValueCodedCharSetId; } public void setNameValueCodedCharSetId(int nameValueCodedCharSetId) { this.nameValueCodedCharSetId = nameValueCodedCharSetId; } public String getStrucId() { return STRUC_ID; } /** * Can only be called when you want to read data from the header(calling the constructor:MQRFH2(MQMessage msg)) * @return */ public int getStrucLength() { return strucLength; } }
27.747475
116
0.521478
039e8d4c271e7cd35b8ba581f1b87aeb6a254fe1
6,962
package com.verdantartifice.primalmagick.common.blocks.rituals; import java.awt.Color; import java.util.Random; import com.verdantartifice.primalmagick.PrimalMagick; import com.verdantartifice.primalmagick.client.fx.FxDispatcher; import com.verdantartifice.primalmagick.common.items.ItemsPM; import com.verdantartifice.primalmagick.common.rituals.IRitualPropBlock; import com.verdantartifice.primalmagick.common.tiles.rituals.IncenseBrazierTileEntity; import com.verdantartifice.primalmagick.common.util.VoxelShapeUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; /** * Block definition for an incense brazier. Incense braziers serve as props in magickal rituals; placing * incense in them at the right time can allow a ritual to progress to the next stage. * * @author Daedalus4096 */ public class IncenseBrazierBlock extends BaseEntityBlock implements IRitualPropBlock { public static final BooleanProperty LIT = BlockStateProperties.LIT; protected static final VoxelShape SHAPE = VoxelShapeUtils.fromModel(new ResourceLocation(PrimalMagick.MODID, "block/incense_brazier")); public IncenseBrazierBlock() { super(Block.Properties.of(Material.METAL).strength(1.5F, 6.0F).sound(SoundType.METAL).lightLevel((state) -> { return state.getValue(BlockStateProperties.LIT) ? 7 : 0; })); this.registerDefaultState(this.defaultBlockState().setValue(LIT, Boolean.FALSE)); } @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return SHAPE; } @Override public RenderShape getRenderShape(BlockState state) { return RenderShape.MODEL; } @Override protected void createBlockStateDefinition(Builder<Block, BlockState> builder) { super.createBlockStateDefinition(builder); builder.add(LIT); } @Override public void animateTick(BlockState stateIn, Level worldIn, BlockPos pos, Random rand) { // Show flame particles if lit if (stateIn.getValue(LIT)) { double x = pos.getX() + 0.5D; double y = pos.getY() + 0.8D; double z = pos.getZ() + 0.65D; worldIn.addParticle(ParticleTypes.FLAME, x, y, z, 0.0D, 0.0D, 0.0D); worldIn.addParticle(ParticleTypes.SMOKE, x, y, z, 0.0D, 0.0D, 0.0D); } // Show spell sparkles if receiving salt power if (this.isBlockSaltPowered(worldIn, pos)) { FxDispatcher.INSTANCE.spellTrail(pos.getX() + rand.nextDouble(), pos.getY() + rand.nextDouble(), pos.getZ() + rand.nextDouble(), Color.WHITE.getRGB()); } } @Override public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (player != null && player.getItemInHand(handIn).getItem() == ItemsPM.INCENSE_STICK.get() && !state.getValue(LIT)) { // If using an incense stick on an unlit brazier, light it worldIn.playSound(player, pos, SoundEvents.GRASS_PLACE, SoundSource.BLOCKS, 1.0F, 0.8F + (RANDOM.nextFloat() * 0.4F)); if (!worldIn.isClientSide) { worldIn.setBlock(pos, state.setValue(LIT, Boolean.TRUE), Block.UPDATE_ALL_IMMEDIATE); if (!player.getAbilities().instabuild) { player.getItemInHand(handIn).shrink(1); if (player.getItemInHand(handIn).getCount() <= 0) { player.setItemInHand(handIn, ItemStack.EMPTY); } } // If this block is awaiting activation for an altar, notify it if (this.isPropOpen(state, worldIn, pos)) { this.onPropActivated(state, worldIn, pos, this.getUsageStabilityBonus()); } } return InteractionResult.SUCCESS; } else if (player != null && player.getItemInHand(handIn).isEmpty() && state.getValue(LIT)) { // If using an empty hand on a lit brazier, snuff it worldIn.playSound(player, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 1.0F, 1.0F); if (!worldIn.isClientSide) { worldIn.setBlock(pos, state.setValue(LIT, Boolean.FALSE), Block.UPDATE_ALL_IMMEDIATE); } return InteractionResult.SUCCESS; } else { return InteractionResult.PASS; } } @SuppressWarnings("deprecation") @Override public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { // Close out any pending ritual activity if replaced if (!worldIn.isClientSide && state.getBlock() != newState.getBlock()) { this.closeProp(state, worldIn, pos); } super.onRemove(state, worldIn, pos, newState, isMoving); } @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new IncenseBrazierTileEntity(pos, state); } @Override public float getStabilityBonus(Level world, BlockPos pos) { return 0.01F; } @Override public float getSymmetryPenalty(Level world, BlockPos pos) { return 0.01F; } @Override public boolean isPropActivated(BlockState state, Level world, BlockPos pos) { if (state != null && state.getBlock() instanceof RitualCandleBlock) { return state.getValue(LIT); } else { return false; } } @Override public String getPropTranslationKey() { return "primalmagick.ritual.prop.incense_brazier"; } public float getUsageStabilityBonus() { return 5.0F; } }
42.45122
163
0.688021
f6781bd39171093ee2a2550a117d134c610ae0fa
1,225
package com.progzc.blog; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.progzc.blog.entity.sys.SysRoleMenu; import com.progzc.blog.mapper.sys.SysRoleMenuMapper; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; import java.util.Arrays; /** * @Description MyBatisPlus测试类 * @Author zhaochao * @Date 2020/11/26 15:14 * @Email zcprog@foxmail.com * @Version V1.0 */ @RunWith(SpringRunner.class) @SpringBootTest public class MyBatisPlusTest { @Resource private SysRoleMenuMapper sysRoleMenuMapper; /** * MyBatisPlus的条件构造器有一个非常重要的细节需要注意: * 即在条件构造器后添加单个条件约束时,当条件约束的condition为false时, * new UpdateWrapper<>().lambda()表示选择所有(特别是在删除/更新操作时非常危险), * 因此谨慎使用带condition的单个条件约束的条件构造器来操作数据库。 */ @Test public void test() { Long[] roleIds = {2L, 1L}; Arrays.stream(roleIds).forEach(roleId -> { sysRoleMenuMapper.delete(new UpdateWrapper<SysRoleMenu>().lambda() .eq(false, SysRoleMenu::getRoleId, roleId)); // eq条件为false时,会删除所有 }); } }
28.488372
85
0.72
ee01489961320e25ad325c10321721544d061ff2
1,667
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.statusbar.phone; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.LinearLayout; public class CloseDragHandle extends LinearLayout { PhoneStatusBar mService; public CloseDragHandle(Context context, AttributeSet attrs) { super(context, attrs); } /** * Ensure that, if there is no target under us to receive the touch, * that we process it ourself. This makes sure that onInterceptTouchEvent() * is always called for the entire gesture. */ @Override public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { setPressed(true); } else { mService.interceptTouchEvent(event); } return true; } @Override public boolean onInterceptTouchEvent(MotionEvent event) { return mService.interceptTouchEvent(event) ? true : super.onInterceptTouchEvent(event); } }
30.87037
80
0.70126
974884ac3f35a078977ba34dfc03d669ba324f5e
1,271
package com.miluhe.rowsolitaireapp.actors; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.scenes.scene2d.Actor; import com.miluhe.rowsolitaireapp.SolitaireTextureLoader; /** * Created by jakke on 16-1-12. */ public class PlayerAvatar extends Actor { public enum TTalkerPosition { ETop, EBottom, ELeft, ERight }; private String mName; private Texture mTexture; private String mTalkerText; private TTalkerPosition mTalkPos = TTalkerPosition.EBottom; public static final int KPlayerTextureX = 128; public static final int KPlayerTextureY = 128; private float mTalkerStartX; private float mTalerStartY; public PlayerAvatar(String name) { mName = name; mTexture = SolitaireTextureLoader.instance().load( name ); if (mTalkPos == TTalkerPosition.EBottom) { } } @Override public void draw(SpriteBatch batch, float parentAlpha) { batch.draw(mTexture, getX(), getY()); } public String getmTalkerText() { return mTalkerText; } public void setmTalkerText(String mTalkerText) { this.mTalkerText = mTalkerText; } }
25.938776
66
0.704957
7b54b43a18d5927aebc61b59c7b7d40936e8f664
1,360
package jetbrains.mps.debug.api; /*Generated by MPS */ import jetbrains.mps.annotations.GeneratedClass; import org.jetbrains.mps.openapi.model.SNodeReference; import jetbrains.mps.debug.api.breakpoints.IBreakpoint; import jetbrains.mps.debug.api.breakpoints.BreakpointLocation; import jetbrains.mps.smodel.SNodePointer; @GeneratedClass(node = "r:c02662c0-67c5-4c3a-8d3a-cd7ffe189340(jetbrains.mps.debug.api)/4474271214082914260", model = "r:c02662c0-67c5-4c3a-8d3a-cd7ffe189340(jetbrains.mps.debug.api)") public class BreakpointInfo { public long myCreationTime = -1; public boolean myIsEnabled; private SNodeReference myLocation; public BreakpointInfo(IBreakpoint breakpoint, BreakpointLocation location) { myCreationTime = breakpoint.getCreationTime(); myIsEnabled = breakpoint.isEnabled(); myLocation = location.getNodePointer(); } public BreakpointInfo() { } public void initBreakpoint(IBreakpoint breakpoint) { breakpoint.setCreationTime(myCreationTime); breakpoint.setEnabled(myIsEnabled); } public boolean isInitialized() { return myLocation != null; } public SNodeReference location() { return myLocation; } public String getLocation() { return SNodePointer.serialize(myLocation); } public void setLocation(String location) { myLocation = SNodePointer.deserialize(location); } }
34
184
0.773529
b92072eeb81da7e3cb504b24e3844288d28db374
327
package rikka.bukkit.entity.living.animal; import org.bukkit.entity.Rabbit; import rikka.api.entity.living.animal.IRabbit; import rikka.bukkit.entity.living.BukkitLiving; public final class BukkitRabbit extends BukkitLiving<Rabbit> implements IRabbit { public BukkitRabbit(Rabbit source) { super(source); } }
27.25
81
0.776758
1e8af1d400fe67c3c4121b2afb3dcee02c6892f8
5,435
package mdl.sinlov.android.screen_rec; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.media.projection.MediaProjectionManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.provider.Settings; import android.widget.Toast; import mdl.sinlov.android.screen_rec.ui.AlertDialogUtils; public class FloatRECActivity extends Activity { public static final int REQUEST_OVERLAY_PERMISSION = 8088; public static final int REQUEST_MEDIA_PROJECTION = 8089; private boolean isCanShowFloatWindow = false; private int checkShowFloatWindow; private Intent skip2LauncherIntent; private Intent mData; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); checkShowFloatWindow = 1; askForPermission(); } @Override protected void onRestart() { super.onRestart(); askForPermission(); } public void askForPermission() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { AlertDialogUtils errorDialog = new AlertDialogUtils(this, AlertDialogUtils.ERROR_TYPE) .setContentText(R.string.dialog_your_cellphone_api_error) .setCanCloseDialog(false) .setConfirmClickListener(new AlertDialogUtils.OnDialogClickListener() { @Override public void onClick(AlertDialogUtils AlertDialogUtils) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { android.os.Process.killProcess(android.os.Process.myPid()); } else { System.exit(0); } } }) ; errorDialog.show(); return; } if (checkShowFloatWindow > 1) { Toast.makeText(getApplicationContext(), R.string.toast_no_floating_window_permission, Toast.LENGTH_LONG).show(); checkShowFloatWindow = 1; skip2Launcher(); return; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (!Settings.canDrawOverlays(this)) { Toast.makeText(getApplicationContext(), R.string.toast_no_floating_window_permission_must, Toast.LENGTH_LONG).show(); Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName())); startActivityForResult(intent, REQUEST_OVERLAY_PERMISSION); } else { isCanShowFloatWindow = true; requestCapturePermission(); } } else { isCanShowFloatWindow = true; requestCapturePermission(); } } private void requestCapturePermission() { MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE); startActivityForResult( mediaProjectionManager.createScreenCaptureIntent(), REQUEST_MEDIA_PROJECTION); } private void startFloatWindow() { if (isCanShowFloatWindow) { ScreenRECService.setResultData(mData); Intent recServerIntent = new Intent(getApplicationContext(), ScreenRECService.class); startService(recServerIntent); skip2Launcher(); } else { Toast.makeText(getApplicationContext(), R.string.toast_no_floating_window_authorization_failure, Toast.LENGTH_SHORT).show(); } } private void skip2Launcher() { if (null == skip2LauncherIntent) { skip2LauncherIntent = new Intent(Intent.ACTION_MAIN); skip2LauncherIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); skip2LauncherIntent.addCategory(Intent.CATEGORY_HOME); } startActivity(skip2LauncherIntent); } protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case REQUEST_OVERLAY_PERMISSION: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (!Settings.canDrawOverlays(this)) { isCanShowFloatWindow = false; } else { isCanShowFloatWindow = true; Toast.makeText(getApplicationContext(), R.string.toast_no_floating_window_authorization_success, Toast.LENGTH_SHORT).show(); startFloatWindow(); } } else { isCanShowFloatWindow = true; } checkShowFloatWindow++; break; case REQUEST_MEDIA_PROJECTION: if (resultCode == RESULT_OK && data != null) { mData = data; startFloatWindow(); } else { Toast.makeText(getApplicationContext(), R.string.msg_sdk_runtime_error, Toast.LENGTH_SHORT).show(); skip2Launcher(); } break; default: break; } } }
39.384058
148
0.598896
3b5da8417d5e0dd8fc2794e886cd4932c6f3142a
5,266
package com.acgist.boot; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.Date; import java.util.Objects; import com.acgist.boot.config.FormatStyle.DateStyle; import com.acgist.boot.config.FormatStyle.DateTimeStyle; import com.acgist.boot.config.FormatStyle.TimeStyle; import lombok.extern.slf4j.Slf4j; /** * 日期工具 * * @author acgist */ @Slf4j public final class DateUtils { private DateUtils() { } /** * 生成时间戳 * * @return 时间戳 * * @see #buildTime(LocalDateTime) */ public static final String buildTime() { return buildTime(LocalDateTime.now()); } /** * 生成时间戳 * * @param localDateTime 时间 * * @return 时间戳 */ public static final String buildTime(LocalDateTime localDateTime) { if (Objects.isNull(localDateTime)) { return buildTime(); } return DateTimeStyle.YYYYMMDDHH24MMSS.getDateTimeFormatter().format(localDateTime); } /** * 字符串转换日期 * * @param value 日期 * @param format 格式 * * @return 日期 */ public static final Date parse(String value, String format) { if(value == null || format == null) { return null; } try { final SimpleDateFormat formatter = new SimpleDateFormat(format); return formatter.parse(value); } catch (ParseException e) { log.error("日期转换异常", e); } return null; } /** * 日期格式化 * * @param date 日期 * @param format 格式 * * @return 日期字符串 */ public static final String format(Date date, String format) { if(date == null || format == null) { return null; } final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); return simpleDateFormat.format(date); } /** * 日期转化 * * @param date Date * * @return LocalDate */ public static final LocalDate toLocalDate(Date date) { return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); } /** * 日期转化 * * @param date Date * * @return LocalDateTime */ public static final LocalDateTime toLocalDateTime(Date date) { return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); } /** * 日期转化 * * @param localDate LocalDate * * @return Date */ public static final Date toDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); } /** * 日期转化 * * @param localDateTime LocalDateTime * * @return Date */ public static final Date toDate(LocalDateTime localDateTime) { return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); } /** * 格式化时间 * * @param localTime LocalTime * @param format 格式 * * @return 时间字符串 */ public static String format(LocalTime localTime, TimeStyle format) { return localTime != null && format != null ? format.getDateTimeFormatter().format(localTime) : null; } /** * 格式化日期 * * @param localDate LocalDate * @param format 格式 * * @return 日期字符串 */ public static String format(LocalDate localDate, DateStyle format) { return localDate != null && format != null ? format.getDateTimeFormatter().format(localDate) : null; } /** * 格式化日期 * * @param localDateTime LocalDateTime * @param format 格式 * * @return 日期字符串 */ public static String format(LocalDateTime localDateTime, DateTimeStyle format) { return localDateTime != null && format != null ? format.getDateTimeFormatter().format(localDateTime) : null; } /** * 字符串转换日期 * * 注意:如果明确时间类型不建议使用该方法 * * @param value 字符串 * * @return LocalDateTime */ public static LocalDateTime parse(String value) { if (value == null) { return null; } final boolean hasMinus = value.indexOf('-') > -1; final boolean hasSemicolon = value.indexOf(':') > -1; final boolean hasSpace = value.indexOf(' ') > -1; final boolean hasComma = value.indexOf('.') > -1; final boolean hasT = value.indexOf('T') > -1; final boolean hasZ = value.indexOf('Z') > -1; int length = value.length(); // 特殊字符长度处理 length = (hasT && hasZ) ? (length + 4) : (hasT || hasZ) ? (length + 2) : length; final DateTimeStyle[] values = DateTimeStyle.values(); for (DateTimeStyle dateTimeStyle : values) { final String format = dateTimeStyle.getFormat(); if(length == format.length()) { if( hasMinus == format.indexOf('-') > -1 && hasSemicolon == format.indexOf(':') > -1 && hasSpace == format.indexOf(' ') > -1 && hasComma == format.indexOf('.') > -1 && hasT == format.indexOf('T') > -1 && hasZ == format.indexOf('Z') > -1 ) { LocalDateTime localDateTime = LocalDateTime.parse(value, dateTimeStyle.getDateTimeFormatter()); if(hasT && hasZ) { // 转换UTC时间 final ZonedDateTime utcZonedDateTime = localDateTime.atZone(ZoneOffset.UTC).withZoneSameInstant(ZoneId.systemDefault()); // 2022-12-12T12:12:12+0800 // final ZonedDateTime utcZonedDateTime = ZonedDateTime.parse(value, dateTimeStyle.getDateTimeFormatter()).withZoneSameInstant(ZoneId.systemDefault()); // 转换本地时间 localDateTime = utcZonedDateTime.toLocalDateTime(); } return localDateTime; } } } return null; } }
23.508929
156
0.66578
d013e9006cfed8593aa74e2ce571f6e73569cb76
3,655
/* * Copyright (c) 2020 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ package com.connectsdk.service.webos.lgcast.screenmirroring.uibc; import android.view.KeyEvent; import java.util.HashMap; public class UibcKeyCode { public static final int TV_KEYCODE_0 = 0x30; public static final int TV_KEYCODE_1 = 0x31; public static final int TV_KEYCODE_2 = 0x32; public static final int TV_KEYCODE_3 = 0x33; public static final int TV_KEYCODE_4 = 0x34; public static final int TV_KEYCODE_5 = 0x35; public static final int TV_KEYCODE_6 = 0x36; public static final int TV_KEYCODE_7 = 0x37; public static final int TV_KEYCODE_8 = 0x38; public static final int TV_KEYCODE_9 = 0x39; //public static final int TV_KEYCODE_CHANNEL_UP = 0x21; //public static final int TV_KEYCODE_CHANNEL_DOWN = 0x22; public static final int TV_KEYCODE_LEFT = 0x25; public static final int TV_KEYCODE_UP = 0x26; public static final int TV_KEYCODE_RIGHT = 0x27; public static final int TV_KEYCODE_DOWN = 0x28; //public static final int TV_KEYCODE_OK = 0x0D; public static final int TV_KEYCODE_STOP = 0x19D; public static final int TV_KEYCODE_REWIND = 0x19C; public static final int TV_KEYCODE_PLAY = 0x19F; public static final int TV_KEYCODE_PAUSE = 0x13; public static final int TV_KEYCODE_FORWARD = 0x1A1; //public static final int TV_KEYCODE_RED = 0x193; //public static final int TV_KEYCODE_GREEN = 0x194; //public static final int TV_KEYCODE_YELLOW = 0x195; //public static final int TV_KEYCODE_BLUE = 0x196; public static final int TV_KEYCODE_BACK = 0x1CD; private static final HashMap<Integer, Integer> mKeycodeMap = new HashMap<>(); static { mKeycodeMap.put(TV_KEYCODE_0, KeyEvent.KEYCODE_0); mKeycodeMap.put(TV_KEYCODE_1, KeyEvent.KEYCODE_1); mKeycodeMap.put(TV_KEYCODE_2, KeyEvent.KEYCODE_2); mKeycodeMap.put(TV_KEYCODE_3, KeyEvent.KEYCODE_3); mKeycodeMap.put(TV_KEYCODE_4, KeyEvent.KEYCODE_4); mKeycodeMap.put(TV_KEYCODE_5, KeyEvent.KEYCODE_5); mKeycodeMap.put(TV_KEYCODE_6, KeyEvent.KEYCODE_6); mKeycodeMap.put(TV_KEYCODE_7, KeyEvent.KEYCODE_7); mKeycodeMap.put(TV_KEYCODE_8, KeyEvent.KEYCODE_8); mKeycodeMap.put(TV_KEYCODE_9, KeyEvent.KEYCODE_9); //mKeycodeMap.put(TV_KEYCODE_CHANNEL_UP, KeyEvent.KEYCODE_); //mKeycodeMap.put(TV_KEYCODE_CHANNEL_DOWN, KeyEvent.KEYCODE_); mKeycodeMap.put(TV_KEYCODE_LEFT, KeyEvent.KEYCODE_DPAD_LEFT); mKeycodeMap.put(TV_KEYCODE_UP, KeyEvent.KEYCODE_DPAD_UP); mKeycodeMap.put(TV_KEYCODE_RIGHT, KeyEvent.KEYCODE_DPAD_RIGHT); mKeycodeMap.put(TV_KEYCODE_DOWN, KeyEvent.KEYCODE_DPAD_DOWN); //mKeycodeMap.put(TV_KEYCODE_OK, KeyEvent.KEYCODE_); mKeycodeMap.put(TV_KEYCODE_STOP, KeyEvent.KEYCODE_MEDIA_STOP); mKeycodeMap.put(TV_KEYCODE_REWIND, KeyEvent.KEYCODE_MEDIA_REWIND); mKeycodeMap.put(TV_KEYCODE_PLAY, KeyEvent.KEYCODE_MEDIA_PLAY); mKeycodeMap.put(TV_KEYCODE_PAUSE, KeyEvent.KEYCODE_MEDIA_PAUSE); mKeycodeMap.put(TV_KEYCODE_FORWARD, KeyEvent.KEYCODE_MEDIA_FAST_FORWARD); //mKeycodeMap.put(TV_KEYCODE_RED, KeyEvent.KEYCODE_); //mKeycodeMap.put(TV_KEYCODE_GREEN, KeyEvent.KEYCODE_); //mKeycodeMap.put(TV_KEYCODE_YELLOW, KeyEvent.KEYCODE_); //mKeycodeMap.put(TV_KEYCODE_BLUE, KeyEvent.KEYCODE_); mKeycodeMap.put(TV_KEYCODE_BACK, KeyEvent.KEYCODE_BACK); } public static int getSystemKeyCode(int tvKeyCode) { return mKeycodeMap.getOrDefault(tvKeyCode, -1); } }
48.733333
81
0.742271
9fdc28666e59a3b6052ae3c4d569763b25d9763d
1,083
package com.coding.gateway.config; import com.coding.commons.base.data.redis.RedisUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; @Configuration public class RedisConfig { @Bean public RedisConnectionFactory redisConnectionFactory() { return new LettuceConnectionFactory(); } @Bean public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) { RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); redisTemplate.setConnectionFactory(redisConnectionFactory); redisTemplate.setEnableTransactionSupport(true); return redisTemplate; } @Bean public RedisUtils redisUtils(RedisTemplate<String, Object> redisTemplate) { return new RedisUtils(redisTemplate); } }
34.935484
103
0.78301
0f50c075e1444d5116d81b8f5768cbe16cfeab57
2,163
package edu.uta.movietalk; import edu.uta.movietalk.entity.User; import edu.uta.movietalk.mapper.UserMapper; import edu.uta.movietalk.utils.JwtUtils; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; /** * @author kong_p */ @Slf4j @SpringBootTest @AutoConfigureMockMvc class UserTests { // a warning for mapper not found, but still work, ignore it @SuppressWarnings(value = "all") @Autowired private UserMapper userMapper; @Autowired private MockMvc mockMvc; private String jwtToken; @Value("${jwt.secret}") private String secret; @BeforeEach void testJwt() { JwtUtils jwtUtils = new JwtUtils(secret, 3600L, 0L); User user = userMapper.selectByPrimaryKey(1); jwtToken = jwtUtils.encode(user.getId(), user.getRole()); log.info(user.toString()); } @Test void testDetail() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/user/detail") .header("Authorization", "Bearer " + jwtToken)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()) .andReturn(); } @Test void testDetailNoAuth() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/user/detail")) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()) .andReturn(); } @Test void contextLoads() { log.debug("The test is running successful"); } }
29.630137
84
0.702728
0ddb647479465d5ca14a644f0b876038c7ff6c39
4,262
package no.oslomet.cs.algdat; import java.util.Arrays; public class QuickSort { public static void main(String[] args) { int[] values = {8, 5, 3, 6, 5, 2, 9}; System.out.println("Usortert: " + Arrays.toString(values)); quicksort(values, 0, values.length-1); System.out.println("Sortert: " + Arrays.toString(values)); } /** * Rekursiv funksjon som implementerer quicksort og sorterer * verdier i intervallet [left, right] * @param values * @param left * @param right */ public static void quicksort(int[] values, int left, int right) { System.out.println("Begynner quicksort i intervallet [" +left + ", " + right + "]"); // Hvis vi ikke har noe intervall igjen (l == r) // så slutter vi rekursjonen. if (left >= right) { System.out.println("Slutter rekursjon!"); return; } //1. Bytt midterste verdi i arrayet til slutten. // - se på verdien. Dette er skilleverdien (Pivot) int m = (left+right) / 2; // Indeks til midterste verdi: eks (2 + 4) / 2 = 6/2 = 3 int pivot = values[m]; //Ta vare på midt-verdien i en temp-variabel values[m] = values[right]; //Overskriv midt-variabelen med siste verdi i arrayet values[right] = pivot; //Overskriv siste verdi i arrayet med temp-varabelen (midten) System.out.println("Pivot er indeks " + m + " verdi " + pivot); System.out.println("Flytter pivot " + m + "-" + right); //2. Partisjoner arrayet fra start til "nest siste kort" (siste kort er midt-kortet) // - Flytt alt som er større enn eller lik skilleverdi til høyre // - Flytt alt som er mindre enn skilleverdi til venstre // - Ta vare indexen til den siste verdien som er mindre enn skilleverdi int index = partition(values, pivot, left, right-1); //3. Flytt skilleverdien (sist i arrayet) tilbake til riktig sortert plass // (rett til høyre for siste verdi som er mindre enn skilleverdi i punkt 2) int sorted_index = index+1; int tmp = values[sorted_index]; values[sorted_index] = values[right]; values[right] = tmp; System.out.println("Flytter pivot tilbake til indeks " + sorted_index); //4. Gjenta for høyre sub-array og venstre sub-array System.out.println("Rekursjon venstre subarray"); quicksort(values, left, sorted_index-1); System.out.println("Rekursjon høyre subarray"); quicksort(values, sorted_index+1, right); System.out.println("Ferdig quicksort i intervallet [" +left + ", " + right + "]"); } /** * Partisjonerer arrayet basert på en skilleverdi, pivot. * Vi plasserer all verdier som er mindre enn pivot til venstre, * og alle verdier som er større eller lik til høyre. Vi returnerer * til slutt indeksen til siste tall som er mindre enn pivot. * @param values * @param left * @param right * @return */ public static int partition(int[] values, int pivot, int left, int right) { int l = left; int r = right; //Kjør løkke helt til høyre og venstre-peker møtes på midten. //Da har vi funnet riktig plassering av pivot. while (l < r) { //Flytt venstre-peker mot høyre så lenge vi har tall //som er riktig sortert i forhold til pivot. while (l <= r && values[l] < pivot) { l = l+1; //++l, l++ } //Gjør tilsvarende for høyre-peker: Flytt mot venstre //så lenge vi har tall som er større eller lik pivot. while (l <= r && values[r] >= pivot) { r = r-1; } //Nå har vi at values[l] >= pivot og values[r] < pivot //Disse kan byttes! if (l < r) { System.out.println("Bytter om " + l + "-" + r); int tmp = values[r]; values[r] = values[l]; values[l] = tmp; l = l+1; r = r-1; } } System.out.println("Siste tall mindre enn pivot er på indeks " + (l-1)); return l-1; } }
39.100917
98
0.571328
40b3936d67430fde9999c20383562dbd3c1fb3a7
961
/** * <copyright> </copyright> * * $Id$ */ package orgomg.cwmx.resource.coboldata; import orgomg.cwm.objectmodel.core.DataType; /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>Usage</b></em>'. <!-- end-user-doc --> * * <!-- begin-model-doc --> * A subclass of UML?s DataType class representing valid COBOL usage types. The type attribute that a COBOLField inherits from StructuralFeature should point to one of the instances of Usage defined here. * * Defined M1 instances of the Usage class have the names: COMP, DISPLAY, and INDEX. Common extension data types (such as BINARY, PACKEDDECIMAL, COMP-1, COMP-2, COMP-3, etc.) can be easily added by creating addition M1 instances of Usage without the need to change the metamodel change. * <!-- end-model-doc --> * * * @see orgomg.cwmx.resource.coboldata.CoboldataPackage#getUsage() * @model * @generated */ public interface Usage extends DataType { } // Usage
35.592593
286
0.706556
541b8169276f847cefc6ee75cc9baa5e1ada5dfa
1,558
package strategytest; import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; import org.junit.Test; import ladders.Ladder; import monkeys.Monkey; import monkeys.Monkey.Direction; import strategy.StrategyTwo; public class StrategyTwoTest { private Ladder l1 = new Ladder(1); private Ladder l2 = new Ladder(2); private Ladder l3 = new Ladder(3); @Test public void ladderTest1() { Monkey m1 = new Monkey(1, Direction.LtoR, 3); Monkey m3 = new Monkey(3, Direction.RtoL, 2); Monkey m4 = new Monkey(4, Direction.RtoL, 5); l1.jumpOn(m1); l1.setDirection(Direction.LtoR); l3.jumpOn(m3); l3.setDirection(Direction.RtoL); /*m3.v < m1.v but m4's direction is the same as m3, so l3 will be chosen*/ List<Ladder> inputLadders = new ArrayList<Ladder>(); inputLadders.add(l1); inputLadders.add(l3); Ladder m4Ladder = new StrategyTwo().getLadder(inputLadders, m4); assertEquals("expected l3", l3, m4Ladder); } @Test public void ladderTest2() { Monkey m1 = new Monkey(1, Direction.LtoR, 3); Monkey m2 = new Monkey(2, Direction.RtoL, 4); Monkey m3 = new Monkey(3, Direction.RtoL, 2); Monkey m4 = new Monkey(4, Direction.RtoL, 5); l2.jumpOn(m2); l2.setDirection(Direction.RtoL); List<Ladder> inputLadders = new ArrayList<Ladder>(); inputLadders.add(l1); inputLadders.add(l2); inputLadders.add(l3); Ladder m4Ladder = new StrategyTwo().getLadder(inputLadders, m4); assertEquals("expected l2", l2, m4Ladder); } }
31.16
78
0.689345
6258a4a02f3627a69073a09c88cd57283bccf27b
1,503
/* * Copyright 2021 Airsaid. https://github.com/airsaid * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.airsaid.localization.ui; import com.intellij.icons.AllIcons; import com.intellij.ui.components.labels.LinkLabel; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * Fixed the problem that sometimes click does not respond. * * @author airsaid */ public class FixedLinkLabel extends LinkLabel<Object> { private boolean isDoClick = false; public FixedLinkLabel() { super("", AllIcons.Ide.Link); addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { if (isEnabled() && isInClickableArea(e.getPoint())) { doClick(); } } @Override public void mouseExited(MouseEvent e) { isDoClick = false; } }); } @Override public void doClick() { if (!isDoClick) { isDoClick = true; super.doClick(); } } }
25.474576
75
0.6833
43b08a536659ee7370bd54700119161a46b5aac5
1,416
/*********************************************************** * @Description : 77.组合问题 * https://leetcode-cn.com/problems/combinations/ * @author : 梁山广(Liang Shan Guang) * @date : 2020/1/24 22:22 * @email : liangshanguang2@gmail.com ***********************************************************/ package CHapter08RecursiveAndBackTrack.LeetCode77Combinations; import java.util.ArrayList; import java.util.List; public class Solution { private void calCombinations(int[] nums, int start, List<Integer> curList, List<List<Integer>> result, int k) { if (curList.size() == k) { result.add(new ArrayList<>(curList)); return; } for (int i = start; i < nums.length; i++) { curList.add(nums[i]); calCombinations(nums,i+1, curList, result, k); // 递归退出就删除一个元素 curList.remove(curList.size() - 1); } } public List<List<Integer>> combine(int n, int k) { List<List<Integer>> result = new ArrayList<>(); List<Integer> curList = new ArrayList<>(); int[] nums = new int[n]; for (int i = 0; i < n; i++) { nums[i] = i+1; } calCombinations(nums, 0, curList, result, k); return result; } public static void main(String[] args) { int n = 4, k = 2; System.out.println(new Solution().combine(n, k)); } }
32.930233
115
0.516949