public void test_set_RP_int_intarray_String_Locale() {
BaseDateTimeField field = new MockPreciseDateTimeField();
int[] values = new int[] {10, 20, 30, 40};
int[] expected = new int[] {10, 20, 30, 40};
int[] result = field.set(new TimeOfDay(), 2, values, "30", null);
assertEquals(true, Arrays.equals(result, expected));
values = new int[] {10, 20, 30, 40};
expected = new int[] {10, 20, 29, 40};
result = field.set(new TimeOfDay(), 2, values, "29", Locale.ENGLISH);
assertEquals(true, Arrays.equals(result, expected));
values = new int[] {10, 20, 30, 40};
expected = new int[] {10, 20, 30, 40};
try {
field.set(new TimeOfDay(), 2, values, "60", null);
fail();
} catch (IllegalArgumentException ex) {}
assertEquals(true, Arrays.equals(values, expected));
values = new int[] {10, 20, 30, 40};
expected = new int[] {10, 20, 30, 40};
try {
field.set(new TimeOfDay(), 2, values, "-1", null);
fail();
} catch (IllegalArgumentException ex) {}
assertEquals(true, Arrays.equals(values, expected));
}