added unit tests for abstract api and attachment api