@Test
public void shouldProperlyMapPermissionModelIntoPermission() throws Exception {

  PermissionModel permissionModel = PermissionModel.builder()
      .permission("CAMERA")
      .rationaleTitle("Permission Request")
      .rationaleMessage("You should allow it")
      .deniedMessage("Allow it!")
      .build();
  Permission permission = permissionModelDataMapper.transformInverse(permissionModel);
  assertThat(permission, notNullValue());
  assertThat(permission, instanceOf(Permission.class));
  assertThat(permission.permission(), notNullValue());
  assertThat(permission.permission(), is("CAMERA"));
  assertThat(permission.rationaleTitle(), notNullValue());
  assertThat(permission.rationaleTitle(), is("Permission Request"));
  assertThat(permission.rationaleMessage(), notNullValue());
  assertThat(permission.rationaleMessage(), is("You should allow it"));
  assertThat(permission.deniedMessage(), notNullValue());
  assertThat(permission.deniedMessage(), is("Allow it!"));
}