Roman Numeral Conversion in Java
I think your code is - in general - good. Your algorithm is working correctly and I really like the idea of using a Hashmap to save the values of the roman numbers.



One thing I miss is the handling of edge cases. Especially you should think about the following edge cases:


letter == null
Empty String
Strings that aren't valid roman numbers (for example "IXI" or "MMMM" aren't valid)


The first two problems are pretty easy to solve:

if(letter == null || letter.equals("")) {
        return -1;
}


The third part is a bit more difficult to solve:

if(!letter.matches("M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$")) {
        return -1;
}


As you can see, you can use a regular expression to validate if the string letter contains a valid roman number (as explained for example here).



One thought about your testing-class: You are using JUnit, which is good, but I think you are testing much too little (remember the edge cases!). 

I wrote a test myself with the following values:

String[] input = {null, "", "I", "V", "XXXIII", "DCCXLVII", "CMXXIX", "MCCXXXII", "MMMCMXCIX", "MMMMXI", "KMXI", "VX", "VL", "VC", "VD", "VM","LC", "LD", "LM", "DM", "IL", "IC", "ID", "IM", "XD", "XM", "CXLV", "MIXI", "IXI", "MXIII", "MMMM", "IIII"}; 

int[] expectedOutput = {-1, -1, 1, 5, 33, 747, 929, 1232, 3999, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 145, -1, -1, 1013, -1, -1};