@Test
public void testGetOptionalForParameterAsInt() {

    Optional<Integer> result = ResourceUtils.getOptionalForParameterAsInt(null);
    assertEquals(Optional.absent(), result);
    result = ResourceUtils.getOptionalForParameterAsInt("");
    assertEquals(Optional.absent(), result);
    int value = 2;
    result = ResourceUtils.getOptionalForParameterAsInt(Integer.toString(value));
    assertEquals(value, result.get().intValue());
}