title: Correct way to test if tested object is not null before assertion
body: <p>I write my first tests, and I want you ask, if that my testing is right. I need test if some object was updated after update method, so here is my test's structure:</p>
  
  <pre><code>@Test
  public void myTest {
     // init myObj variable which I want test
     // myObjService is my service for my object which I've initialized in @Before tagged function
     MyObj myObj = myObjService.getById(465);
  
     // test if that variable is initialized, and it is not null
     Assert.assertNotNull(myObj);
  
     // update some properties of myObj
     myObj.setX(...);
     myObj.setY(...);
     ...
  
     // call update function which update obj in collection by Id of object
     myObjService.update(myObj);
  
     // get object with same id which should be with updated properties
     MyObj myUpdatedObj = myObjService.getById(465);
  
     // test that properties
     Assert.assertEquals(myObj.getX(), myUpdatedObj.getX());
     Assert.assertEquals(myObj.getY(), myUpdatedObj.getY());
     ...
  }
  </code></pre>
  
  <p>Is that procedure correct or should I edit something?</p>