Q:

Method call and atomicity

I have a method with a single atomic operation, like this one
int value;

public void setValue(int value) {
    this.value = value;
}

then I call it in obvious way, like 
foo.setValue(10);

The question is: would it be atomic operation? If no, what atomic operations will be executed? How I can test this at my computer (if I can)?

A:

Yes, the
this.value = value;

operation is atomic. See the Java Language Specification: Threads and Locks.
Note though that threads are allowed to cache their own values of non-volatile variables, so it is not guaranteed that a successive get-operation would yield the last set value.
To get rid of these kind of data races you need to synchronize the access to the variable somehow. This can be done by

making the method synchronized,
by letting the variable be volatile or,
use AtomicInteger from the java.util.concurrent package. (preferred way imo)

It should also be noted that the operation would not be atomic if you changed from int to long or double. Here is a relevant section from the JLS:

17.4 Non-atomic Treatment of double and long
If a double or long variable is not declared volatile, then for the purposes of load, store, read, and write actions they are treated as if they were two variables of 32 bits each: wherever the rules require one of these actions, two such actions are performed, one for each 32-bit half.

Some useful links:

Wikipedia article on the Java Memory Model
Java Language Specification, Interaction with the Memory Model

