hashCode help

I am trying to implement a hashCode method to return the last few chars of a word or number inputted using my JUnit test. Here is my current method:

public int hashCode(String value){
	String test = value;
	int hash = 1;
	int len = test.length();
	for ( int i=0; i<len; i++ )
	      hash = 31 * hash + len;
	   return hash;

On my test results I get a failure saying it expected a

and got an int (98727). Can anyone help me write a hashCode method that returns that last two chars of a word or int? Any help would be most appreciated.