TestNG uses attributes and an annotation called @Test to tag the test methods, differentiating which ones are setup/teardown methods, test methods, or private methods in the class. In this example, the test method has a dataProvider and class defined as attributes to the test method:
/**
* tc001_appFeatureAction - test method to demonstrate @Test DP Annotation
*
* @param data
* @throws Exception
*/
@Test(dataProvider="myData_JSON",dataProviderClass=JSONDataProvider.class)
public void tc001_appFeatureAction (JSONObject data) throws Exception {
....