Added new tests (Composite, Register, Error Handling) and refactored HttpEndpoint

Change-Id: Ib5c927bf2a0b425560039ccb98754f6ebd8af4b7