@Test
public void shouldProperlyMapPermissionEntityIntoPermission() throws Exception {

  PermissionEntity permissionCameraEntity = new PermissionEntity.Builder()
      .permission("CAMERA")
      .rationaleTitle("Permission Request")
      .rationaleMessage("You should allow this permission")
      .deniedMessage("You must allow this permission in order for this feature to work")
      .build();
  Permission permissionCamera = permissionEntityDataMapper.transform(permissionCameraEntity);
  assertThat(permissionCamera, notNullValue());
  assertThat(permissionCamera, instanceOf(Permission.class));
  assertThat(permissionCamera.permission(), notNullValue());
  assertThat(permissionCamera.permission(), is("CAMERA"));
  assertThat(permissionCamera.rationaleTitle(), notNullValue());
  assertThat(permissionCamera.rationaleTitle(), is("Permission Request"));
  assertThat(permissionCamera.rationaleMessage(), notNullValue());
  assertThat(permissionCamera.rationaleMessage(), is("You should allow this permission"));
  assertThat(permissionCamera.deniedMessage(), notNullValue());
  assertThat(permissionCamera.deniedMessage(),
      is("You must allow this permission in order for this feature to work"));
}