### Question:
JPALink { public void create(final PostUriInfo uriInfo, final InputStream content, final String requestContentType, final String contentType) throws ODataJPARuntimeException, ODataJPAModelException { modifyLink((UriInfo) uriInfo, content, requestContentType); } JPALink(final ODataJPAContext context); void setSourceJPAEntity(final Object jpaEntity); void setTargetJPAEntity(final Object jpaEntity); Object getTargetJPAEntity(); Object getSourceJPAEntity(); void create(final PostUriInfo uriInfo, final InputStream content, final String requestContentType,
      final String contentType); void update(final PutMergePatchUriInfo putUriInfo, final InputStream content, final String requestContentType,
      final String contentType); void delete(final DeleteUriInfo uriInfo); void save(); void create(final EdmEntitySet entitySet, final ODataEntry oDataEntry,
      final List<String> navigationPropertyNames); @SuppressWarnings("unchecked") static void linkJPAEntities(final Collection<Object> targetJPAEntities, final Object sourceJPAEntity,
      final EdmNavigationProperty navigationProperty);  }### Answer:
@Test public void testCreateLink() { testCase = 0; try { ODataJPAContext context = mockODataJPAContext(false); JPALink link = new JPALink(context); Field processor = JPALink.class. getDeclaredField("jpaProcessor"); processor.setAccessible(true); processor.set(link, new JPAProcessorMock()); link.create(mockPostURIInfo(false), requestPayload, "application/json", "application/json"); assertEquals(2, header.getNotesDetails().size()); } catch (ODataException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (NoSuchFieldException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (SecurityException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (IllegalArgumentException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (IllegalAccessException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (NoSuchMethodException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } }