restructure test method