test_class.declarator: AUDIT_MESSAGE_JSON = "/audit/sampleAuditMessage.json"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_MESSAGE_JSON = "/audit/sampleAuditMessage.json";
test_class.type: String
test_class.var_name: AUDIT_MESSAGE_JSON
test_class.declarator: PAGINATED_AUDIT_MESSAGE_RESPONSE_JSON = "/audit/sampleAuditMessages.json"
test_class.modifier: private static final
test_class.original_string: private static final String PAGINATED_AUDIT_MESSAGE_RESPONSE_JSON = "/audit/sampleAuditMessages.json";
test_class.type: String
test_class.var_name: PAGINATED_AUDIT_MESSAGE_RESPONSE_JSON
test_class.declarator: AUDIT_ID = 1
test_class.modifier: private static final
test_class.original_string: private static final Integer AUDIT_ID = 1;
test_class.type: Integer
test_class.var_name: AUDIT_ID
test_class.declarator: AUDIT_ACTION = "testAction"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_ACTION = "testAction";
test_class.type: String
test_class.var_name: AUDIT_ACTION
test_class.declarator: AUDIT_DETAILS = "testDetails"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_DETAILS = "testDetails";
test_class.type: String
test_class.var_name: AUDIT_DETAILS
test_class.declarator: AUDIT_NAME = "test"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_NAME = "test";
test_class.type: String
test_class.var_name: AUDIT_NAME
test_class.declarator: AUDIT_USED_URL = "/test/test"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_USED_URL = "/test/test";
test_class.type: String
test_class.var_name: AUDIT_USED_URL
test_class.declarator: AUDIT_OPERATION = "testOperation"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_OPERATION = "testOperation";
test_class.type: String
test_class.var_name: AUDIT_OPERATION
test_class.declarator: AUDIT_PARENT_URL = "parentUrl"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_PARENT_URL = "parentUrl";
test_class.type: String
test_class.var_name: AUDIT_PARENT_URL
test_class.declarator: AUDIT_LOCAL_URL = "localUrl"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_LOCAL_URL = "localUrl";
test_class.type: String
test_class.var_name: AUDIT_LOCAL_URL
test_class.declarator: AUDIT_LINK_TYPE = "test"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_LINK_TYPE = "test";
test_class.type: String
test_class.var_name: AUDIT_LINK_TYPE
test_class.declarator: AUDIT_NEXT_MESSAGE_UUID = "next_message_uuid"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_NEXT_MESSAGE_UUID = "next_message_uuid";
test_class.type: String
test_class.var_name: AUDIT_NEXT_MESSAGE_UUID
test_class.declarator: AUDIT_UUID = "9f3dccc9-6bc3-4a2b-862d-af4ce41caa28"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_UUID = "9f3dccc9-6bc3-4a2b-862d-af4ce41caa28";
test_class.type: String
test_class.var_name: AUDIT_UUID
test_class.declarator: AUDIT_CREATOR_INSTANCE = "sampleCreatorInstance1"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_CREATOR_INSTANCE = "sampleCreatorInstance1";
test_class.type: String
test_class.var_name: AUDIT_CREATOR_INSTANCE
test_class.declarator: AUDIT_MERGE_CONFLICT_UUID = "test"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_MERGE_CONFLICT_UUID = "test";
test_class.type: String
test_class.var_name: AUDIT_MERGE_CONFLICT_UUID
test_class.declarator: AUDIT_MERGE_CONFLICT_UUID2 = "test2"
test_class.modifier: private static final
test_class.original_string: private static final String AUDIT_MERGE_CONFLICT_UUID2 = "test2";
test_class.type: String
test_class.var_name: AUDIT_MERGE_CONFLICT_UUID2
test_class.declarator: PAGINATED_PAGE = 1
test_class.modifier: private static final
test_class.original_string: private static final Integer PAGINATED_PAGE = 1;
test_class.type: Integer
test_class.var_name: PAGINATED_PAGE
test_class.declarator: PAGINATED_PAGE_SIZE = 100
test_class.modifier: private static final
test_class.original_string: private static final Integer PAGINATED_PAGE_SIZE = 100;
test_class.type: Integer
test_class.var_name: PAGINATED_PAGE_SIZE
test_class.declarator: stringToAuditMessageConverter = new StringToAuditMessageConverter()
test_class.modifier: private
test_class.original_string: private StringToAuditMessageConverter stringToAuditMessageConverter = new StringToAuditMessageConverter();
test_class.type: StringToAuditMessageConverter
test_class.var_name: stringToAuditMessageConverter
test_class.declarator: auditMessageToStringConverter = new AuditMessageToStringConverter()
test_class.modifier: private
test_class.original_string: private AuditMessageToStringConverter auditMessageToStringConverter = new AuditMessageToStringConverter();
test_class.type: AuditMessageToStringConverter
test_class.var_name: auditMessageToStringConverter
test_class.declarator: auditService
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private SyncAuditServiceImpl auditService;
test_class.type: SyncAuditServiceImpl
test_class.var_name: auditService
test_class.declarator: dao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SyncAuditDao dao;
test_class.type: SyncAuditDao
test_class.var_name: dao
test_class.declarator: configurationService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SyncConfigurationService configurationService;
test_class.type: SyncConfigurationService
test_class.var_name: configurationService
test_class.file: api/src/test/java/org/openmrs/module/sync2/api/service/impl/SyncAuditServiceImplTest.java
test_class.identifier: SyncAuditServiceImplTest
test_case.body: @Test
      public void getPaginatedMessages() throws Exception {
          Integer page = 1;
          Integer pageSize = 100;
  
          PaginatedAuditMessages messages = preparePaginatedAuditMessages();
          when(dao.getPaginatedAuditMessages(page, pageSize, null, "", "", ""))
                  .thenReturn(messages);
          
          String expected = readJsonFromFile(PAGINATED_AUDIT_MESSAGE_RESPONSE_JSON);
          String fetched = auditService.getPaginatedMessages(
                  page, pageSize, null, "", "", "") + System.getProperty("line.separator");
  
          Assert.assertEquals(expected, fetched);
      }
test_case.class_method_signature: SyncAuditServiceImplTest.getPaginatedMessages()
test_case.full_signature: @Test public void getPaginatedMessages()
test_case.identifier: getPaginatedMessages
test_case.invocations: preparePaginatedAuditMessages thenReturn when getPaginatedAuditMessages readJsonFromFile getPaginatedMessages getProperty assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getPaginatedMessages()
focal_class.declarator: dao
focal_class.modifier: private
focal_class.original_string: private SyncAuditDao dao;
focal_class.type: SyncAuditDao
focal_class.var_name: dao
focal_class.declarator: configuration
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SyncConfigurationService configuration;
focal_class.type: SyncConfigurationService
focal_class.var_name: configuration
focal_class.file: api/src/main/java/org/openmrs/module/sync2/api/service/impl/SyncAuditServiceImpl.java
focal_class.identifier: SyncAuditServiceImpl
focal_class.interfaces: implements SyncAuditService
focal_class.class_method_signature: SyncAuditServiceImpl.setDao(SyncAuditDao dao)
focal_class.full_signature: public void setDao(SyncAuditDao dao)
focal_class.identifier: setDao
focal_class.modifiers: public
focal_class.parameters: (SyncAuditDao dao)
focal_class.return: void
focal_class.signature: void setDao(SyncAuditDao dao)
focal_class.class_method_signature: SyncAuditServiceImpl.getMessageByUuid(String uuid)
focal_class.full_signature: @Override public AuditMessage getMessageByUuid(String uuid)
focal_class.identifier: getMessageByUuid
focal_class.modifiers: @Override public
focal_class.parameters: (String uuid)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage getMessageByUuid(String uuid)
focal_class.class_method_signature: SyncAuditServiceImpl.getMessageById(Integer id)
focal_class.full_signature: @Override public AuditMessage getMessageById(Integer id)
focal_class.identifier: getMessageById
focal_class.modifiers: @Override public
focal_class.parameters: (Integer id)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage getMessageById(Integer id)
focal_class.class_method_signature: SyncAuditServiceImpl.getJsonMessageByUuid(String uuid)
focal_class.full_signature: @Override public String getJsonMessageByUuid(String uuid)
focal_class.identifier: getJsonMessageByUuid
focal_class.modifiers: @Override public
focal_class.parameters: (String uuid)
focal_class.return: String
focal_class.signature: String getJsonMessageByUuid(String uuid)
focal_class.class_method_signature: SyncAuditServiceImpl.getJsonMessageById(Integer id)
focal_class.full_signature: @Override public String getJsonMessageById(Integer id)
focal_class.identifier: getJsonMessageById
focal_class.modifiers: @Override public
focal_class.parameters: (Integer id)
focal_class.return: String
focal_class.signature: String getJsonMessageById(Integer id)
focal_class.class_method_signature: SyncAuditServiceImpl.getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_class.full_signature: @Override public String getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_class.identifier: getPaginatedMessages
focal_class.modifiers: @Override public
focal_class.parameters: (Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_class.return: String
focal_class.signature: String getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_class.class_method_signature: SyncAuditServiceImpl.saveAuditMessageDuringSync(AuditMessage auditMessage)
focal_class.full_signature: @Override public AuditMessage saveAuditMessageDuringSync(AuditMessage auditMessage)
focal_class.identifier: saveAuditMessageDuringSync
focal_class.modifiers: @Override public
focal_class.parameters: (AuditMessage auditMessage)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage saveAuditMessageDuringSync(AuditMessage auditMessage)
focal_class.class_method_signature: SyncAuditServiceImpl.saveAuditMessage(AuditMessage auditMessage)
focal_class.full_signature: @Override public AuditMessage saveAuditMessage(AuditMessage auditMessage)
focal_class.identifier: saveAuditMessage
focal_class.modifiers: @Override public
focal_class.parameters: (AuditMessage auditMessage)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage saveAuditMessage(AuditMessage auditMessage)
focal_class.class_method_signature: SyncAuditServiceImpl.setNextAudit(AuditMessage current, AuditMessage next)
focal_class.full_signature: @Override public AuditMessage setNextAudit(AuditMessage current, AuditMessage next)
focal_class.identifier: setNextAudit
focal_class.modifiers: @Override public
focal_class.parameters: (AuditMessage current, AuditMessage next)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage setNextAudit(AuditMessage current, AuditMessage next)
focal_class.class_method_signature: SyncAuditServiceImpl.getAllCreatorIds()
focal_class.full_signature: @Override public Set<String> getAllCreatorIds()
focal_class.identifier: getAllCreatorIds
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getAllCreatorIds()
focal_class.class_method_signature: SyncAuditServiceImpl.getMessageByMergeConflictUuid(String uuid)
focal_class.full_signature: @Override public AuditMessage getMessageByMergeConflictUuid(String uuid)
focal_class.identifier: getMessageByMergeConflictUuid
focal_class.modifiers: @Override public
focal_class.parameters: (String uuid)
focal_class.return: AuditMessage
focal_class.signature: AuditMessage getMessageByMergeConflictUuid(String uuid)
focal_class.class_method_signature: SyncAuditServiceImpl.getJsonMessage(AuditMessage message)
focal_class.full_signature: @Override public String getJsonMessage(AuditMessage message)
focal_class.identifier: getJsonMessage
focal_class.modifiers: @Override public
focal_class.parameters: (AuditMessage message)
focal_class.return: String
focal_class.signature: String getJsonMessage(AuditMessage message)
focal_class.class_method_signature: SyncAuditServiceImpl.serializeResultsWithAuditMessage(T results)
focal_class.full_signature: private String serializeResultsWithAuditMessage(T results)
focal_class.identifier: serializeResultsWithAuditMessage
focal_class.modifiers: private
focal_class.parameters: (T results)
focal_class.return: String
focal_class.signature: String serializeResultsWithAuditMessage(T results)
focal_class.superclass: extends BaseOpenmrsService
focal_method.body: @Override
      public String getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId) throws APIException {
          PaginatedAuditMessages paginatedAuditMessages = dao.getPaginatedAuditMessages(page, pageSize, success, operation,
                  resourceName, creatorInstanceId);
          return serializeResultsWithAuditMessage(paginatedAuditMessages);
      }
focal_method.class_method_signature: SyncAuditServiceImpl.getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_method.full_signature: @Override public String getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_method.identifier: getPaginatedMessages
focal_method.invocations: getPaginatedAuditMessages serializeResultsWithAuditMessage
focal_method.modifiers: @Override public
focal_method.parameters: (Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)
focal_method.return: String
focal_method.signature: String getPaginatedMessages(Integer page, Integer pageSize, Boolean success, String operation,
                                         String resourceName, String creatorInstanceId)