I'm trying to write a TestNG to test db update for a property.Pseudocode is as below.
@Parameters({"newValue"})
@Test
public void testUpdateValue(@Optional String newValue)
{
    String originalValue = getValueFromDataBase(); //get Original value
    updateValue(newValue);   //update property to newValue
    String updatedValue = getValueFromDataBase();    //get updated value from db
    Assert.assertEquals(updatedValue == newValue, true);   //test value updated correctly.
    updateValue(originalValue);     // reset to origal value after test
}
am I using the correct method to test the db update? or Any other solutions are there in testNG?
Thanks in advance.
 
     
     
     
    