package de.philipphager.disclosure.util.device;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

import static org.assertj.core.api.Assertions.assertThat;

@RunWith(MockitoJUnitRunner.class)
public class DeviceFeaturesShould {
  @Test public void notSupportRuntimePermissionsBeforeAndroidMarshmallow() {
    DeviceFeatures deviceFeatures = new DeviceFeatures(22);
    assertThat(deviceFeatures.supportsRuntimePermissions()).isFalse();
  }

  @Test public void supportRuntimePermissionsOnMarshmallowAndHigher() {
    DeviceFeatures deviceFeatures = new DeviceFeatures(23);
    assertThat(deviceFeatures.supportsRuntimePermissions()).isTrue();
  }
}

@@ -42,16 +42,41 @@
 evice;%0A%0A
+import android.os.Build;%0A
 import o
@@ -437,10 +437,40 @@
 res(
-22
+Build.VERSION_CODES.LOLLIPOP_MR1
 );%0A 
@@ -675,10 +675,29 @@
 res(
-23
+Build.VERSION_CODES.M
 );%0A 

Replace magic numbers