@Test
public void testValidSave() {

    doReturn(component).when(service).save(any(ComponentDomain.class));
    final Response response = resource.save(component);
    Assert.assertEquals(response.getStatus(), 201);
    Assert.assertEquals(response.getEntity(), component);
}