### Question:
BluetoothMetrics extends SystemMetrics<BluetoothMetrics> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BluetoothMetrics that = (BluetoothMetrics) o; if (bleScanCount != that.bleScanCount || bleScanDurationMs != that.bleScanDurationMs || bleOpportunisticScanCount != that.bleOpportunisticScanCount || bleOpportunisticScanDurationMs != that.bleOpportunisticScanDurationMs) { return false; } return true; }  @Override BluetoothMetrics sum(@Nullable BluetoothMetrics b, @Nullable BluetoothMetrics output); @Override BluetoothMetrics diff(@Nullable BluetoothMetrics b, @Nullable BluetoothMetrics output); @Override BluetoothMetrics set(BluetoothMetrics b); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); public int bleScanCount; public long bleScanDurationMs; public int bleOpportunisticScanCount; public long bleOpportunisticScanDurationMs; }### Answer:
@Test public void testEquals() { BluetoothMetrics metricsA = new BluetoothMetrics(); metricsA.bleScanDurationMs = 1000; metricsA.bleScanCount = 2; metricsA.bleOpportunisticScanDurationMs = 4000; metricsA.bleOpportunisticScanCount = 8; BluetoothMetrics metricsB = new BluetoothMetrics(); metricsB.bleScanDurationMs = 1000; metricsB.bleScanCount = 2; metricsB.bleOpportunisticScanDurationMs = 4000; metricsB.bleOpportunisticScanCount = 8; assertThat(new BluetoothMetrics()).isEqualTo(new BluetoothMetrics()); assertThat(metricsA).isEqualTo(metricsB); }