@Test
public void shouldProperlyMapPermissionIntoPermissionEntity() throws Exception {

  Permission permissionCamera = Permission.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();
  PermissionEntity permissionCameraEntity =
      permissionEntityDataMapper.transformInverse(permissionCamera);
  assertThat(permissionCameraEntity, notNullValue());
  assertThat(permissionCameraEntity, instanceOf(PermissionEntity.class));
  assertThat(permissionCameraEntity.getPermission(), notNullValue());
  assertThat(permissionCameraEntity.getPermission(), is("CAMERA"));
  assertThat(permissionCameraEntity.getRationaleTitle(), notNullValue());
  assertThat(permissionCameraEntity.getRationaleTitle(), is("Permission Request"));
  assertThat(permissionCameraEntity.getRationaleMessage(), notNullValue());
  assertThat(permissionCameraEntity.getRationaleMessage(), is("You should allow this permission"));
  assertThat(permissionCameraEntity.getDeniedMessage(), notNullValue());
  assertThat(permissionCameraEntity.getDeniedMessage(),
      is("You must allow this permission in order for this feature to work"));
}