@Test
public void test_FileSystem_Exposes_DeviceState() {

  // Prepare
  assert myFileSystem != null;
  assert myMockDevice != null;
  TestDevices.addNexus7Api23Commands(myMockDevice.getShellCommands());
  // Act/Assert
  myMockDevice.setState(null);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.DISCONNECTED);
  myMockDevice.setState(IDevice.DeviceState.BOOTLOADER);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.BOOTLOADER);
  myMockDevice.setState(IDevice.DeviceState.OFFLINE);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.OFFLINE);
  myMockDevice.setState(IDevice.DeviceState.ONLINE);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.ONLINE);
  myMockDevice.setState(IDevice.DeviceState.RECOVERY);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.RECOVERY);
  myMockDevice.setState(IDevice.DeviceState.SIDELOAD);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.SIDELOAD);
  myMockDevice.setState(IDevice.DeviceState.UNAUTHORIZED);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.UNAUTHORIZED);
  myMockDevice.setState(IDevice.DeviceState.DISCONNECTED);
  assertThat(myFileSystem.getDeviceState()).isEqualTo(DeviceState.DISCONNECTED);
}