JUnit testing custom exception
This page should tell you everything you need to know. For the simplest case, which seems to be your case, just do this:
@Test(expected= CustomException.class)
public void myTest() {
MyObject obj = new MyObject();
obj.doSomethingThatMightThrowCustomException();
}