added method and test to current folder.