finished charge junit tests and added error classes