Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
35 kB
1
Indexable
Never
package com.mycompany.test;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.Proxy.Type;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import javax.accessibility.AccessibleText;

/**
 *
 * @author ga
 */
public class Test {

    static  String json = "{\"testCaseSet\":[{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MessageEndAfterPrefix\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MessageEndAfterPrefix\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SmsManagerTest\",\"testname\":\"testSendAndReceiveMessages\",\"failure_message\":\"java.lang.AssertionError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.telephony.cts.SmsManagerTest#testSendAndReceiveMessages\"},{\"modulename\":\"CtsPermission2TestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.permission2.cts.NoReceiveSmsPermissionTest\",\"testname\":\"testReceiveTextMessage\",\"failure_message\":\"junit.framework.AssertionFailedError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.permission2.cts.NoReceiveSmsPermissionTest#testReceiveTextMessage\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MissingSecondColon\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MissingSecondColon\"},{\"modulename\":\"CtsJobSchedulerTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.jobscheduler.cts.JobThrottlingTest\",\"testname\":\"testJobsInRestrictedBucket_NoRequiredNetwork\",\"failure_message\":\"java.lang.AssertionError: New job didn't start in RESTRICTED bucket\\r\",\"combinedName\":\"android.jobscheduler.cts.JobThrottlingTest#testJobsInRestrictedBucket_NoRequiredNetwork\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.MmsTest\",\"testname\":\"testSendMmsMessageWithMessageId\",\"failure_message\":\"java.lang.AssertionError\\r\",\"combinedName\":\"android.telephony.cts.MmsTest#testSendMmsMessageWithMessageId\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_NotVvm\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_NotVvm\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerWithFailureResults\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle.Run level error reported reason: 'Instrumentation reported numtests=880 but only ran 836. There were 314 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerWithFailureResults\"},{\"modulename\":\"CtsNetTestCasesLegacyApi22\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.net.cts.legacy.api22.ConnectivityManagerLegacyTest\",\"testname\":\"testStartUsingNetworkFeature_enableHipri\",\"failure_message\":\"junit.framework.AssertionFailedError: Telephony state is out of service. Please ensure device has a working SIM card.\\r\",\"combinedName\":\"android.net.cts.legacy.api22.ConnectivityManagerLegacyTest#testStartUsingNetworkFeature_enableHipri\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SmsManagerTest\",\"testname\":\"testSmsRetriever\",\"failure_message\":\"java.lang.AssertionError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.telephony.cts.SmsManagerTest#testSmsRetriever\"},{\"modulename\":\"CtsPermission2TestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.permission2.cts.NoReceiveSmsPermissionTest\",\"testname\":\"testAppSpecificSmsToken\",\"failure_message\":\"junit.framework.AssertionFailedError: [RERUN] No active telephony subscription. Check there is one enabled.\\r\",\"combinedName\":\"android.permission2.cts.NoReceiveSmsPermissionTest#testAppSpecificSmsToken\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testBytesTransferByTagAndMetered\",\"failure_message\":\"expected to be at least: 1\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testBytesTransferByTagAndMetered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_TrailingSemiColon\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_TrailingSemiColon\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerWithFailureResults\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle.Run level error reported reason: 'Instrumentation reported numtests=322 but only ran 318. There were 30 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerWithFailureResults\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testSimStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.ims.cts.SipDelegateManagerTest#testCloseSessionBye.Run level error reported reason: 'Instrumentation reported numtests=322 but only ran 318. There were 30 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_InvalidKeyValuePair\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_InvalidKeyValuePair\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SmsManagerTest\",\"testname\":\"testSmsBlocking\",\"failure_message\":\"java.lang.AssertionError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.telephony.cts.SmsManagerTest#testSmsBlocking\"},{\"modulename\":\"CtsPermission2TestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.permission2.cts.NoReceiveSmsPermissionTest\",\"testname\":\"testAppSpecificSmsToken\",\"failure_message\":\"junit.framework.AssertionFailedError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.permission2.cts.NoReceiveSmsPermissionTest#testAppSpecificSmsToken\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testSimStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.SubscriptionManagerTest#testGetOpportunisticSubscriptions.Run level error reported reason: 'Instrumentation reported numtests=880 but only ran 836. There were 314 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testServiceStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange.Run level error reported reason: 'Instrumentation reported numtests=32 but only ran 27. There were 27 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange\"},{\"modulename\":\"CtsHostsideNetworkTests\",\"abi\":\"arm64-v8a\",\"testCasename\":\"com.android.cts.net.HostsideVpnTests\",\"testname\":\"testChangeUnderlyingNetworks\",\"failure_message\":\"java.lang.AssertionError: on-device tests failed:\",\"combinedName\":\"com.android.cts.net.HostsideVpnTests#testChangeUnderlyingNetworks\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.MmsTest\",\"testname\":\"testSendMmsMessageWithInactiveSubscriptionId\",\"failure_message\":\"java.lang.AssertionError\\r\",\"combinedName\":\"android.telephony.cts.MmsTest#testSendMmsMessageWithInactiveSubscriptionId\"},{\"modulename\":\"CtsHostsideNetworkTests[instant]\",\"abi\":\"arm64-v8a\",\"testCasename\":\"com.android.cts.net.HostsideVpnTests\",\"testname\":\"testChangeUnderlyingNetworks\",\"failure_message\":\"java.lang.AssertionError: on-device tests failed:\",\"combinedName\":\"com.android.cts.net.HostsideVpnTests#testChangeUnderlyingNetworks\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_EmptyField\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_EmptyField\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_InvalidMissingKey\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_InvalidMissingKey\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SmsManagerTest\",\"testname\":\"testSmsNotPersisted_failsWithoutCarrierPermissions\",\"failure_message\":\"java.lang.AssertionError: [RERUN] SIM card does not provide phone number. Use a suitable SIM Card.\\r\",\"combinedName\":\"android.telephony.cts.SmsManagerTest#testSmsNotPersisted_failsWithoutCarrierPermissions\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MissingFirstColon\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MissingFirstColon\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testServiceStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange.Run level error reported reason: 'Instrumentation reported numtests=880 but only ran 836. There were 314 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_originatingNumber_match_filtered\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_originatingNumber_match_filtered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_PrefixMismatch\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_PrefixMismatch\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MessageEndAfterClientPrefix\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MessageEndAfterClientPrefix\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_originatingNumber_mismatch_notFiltered\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_originatingNumber_mismatch_notFiltered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_MissingValue\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_MissingValue\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_EmptyPrefix\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_EmptyPrefix\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_EmptyField\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_EmptyField\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testMobileBytesTransferByFgBg\",\"failure_message\":\"java.lang.AssertionError: On-device tests failed:\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testMobileBytesTransferByFgBg\"},{\"modulename\":\"CtsPermission2TestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.permission2.cts.NoReceiveSmsPermissionTest\",\"testname\":\"testReceiveTextMessage\",\"failure_message\":\"junit.framework.AssertionFailedError: [RERUN] No active telephony subscription. Check there is one enabled.\\r\",\"combinedName\":\"android.permission2.cts.NoReceiveSmsPermissionTest#testReceiveTextMessage\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_port_anydata_notData\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_port_anydata_notData\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testMobileBytesTransferByFgBg\",\"failure_message\":\"expected to be at least: 1\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testMobileBytesTransferByFgBg\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_InvalidMissingKey\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_InvalidMissingKey\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MessageEndAfterPrefix\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MessageEndAfterPrefix\"},{\"modulename\":\"CtsJobSchedulerTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.jobscheduler.cts.JobThrottlingTest\",\"testname\":\"testJobsInRestrictedBucket_NoRequiredNetwork\",\"failure_message\":\"java.lang.AssertionError: New job started in RESTRICTED bucket\\r\",\"combinedName\":\"android.jobscheduler.cts.JobThrottlingTest#testJobsInRestrictedBucket_NoRequiredNetwork\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerToggle\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange.Run level error reported reason: 'Instrumentation reported numtests=880 but only ran 836. There were 314 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testPermissionlessService_ignored\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testPermissionlessService_ignored\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testSimStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.SubscriptionManagerTest#testRestoreAllSimSpecificSettingsFromBackup.Run level error reported reason: 'Instrumentation reported numtests=32 but only ran 27. There were 27 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange\"},{\"modulename\":\"CtsNetTestCasesLegacyApi22\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.net.cts.legacy.api22.ConnectivityManagerLegacyTest\",\"testname\":\"testStartUsingNetworkFeature_enableHipri\",\"failure_message\":\"junit.framework.AssertionFailedError: Did not receive expected CONNECTED broadcast for type 1 after 30000 ms\\r\",\"combinedName\":\"android.net.cts.legacy.api22.ConnectivityManagerLegacyTest#testStartUsingNetworkFeature_enableHipri\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_port_anydata_notData\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'int android.telephony.TelephonyManager.getPhoneType()' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_port_anydata_notData\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_TrailingSemiColon\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_TrailingSemiColon\"},{\"modulename\":\"CtsJobSchedulerTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.jobscheduler.cts.JobThrottlingTest\",\"testname\":\"testJobsInRestrictedBucket_NoRequiredNetwork\",\"failure_message\":\"java.lang.AssertionError: Wifi must be connected to an access point for this test. expected:<true> but was:<false>\\r\",\"combinedName\":\"android.jobscheduler.cts.JobThrottlingTest#testJobsInRestrictedBucket_NoRequiredNetwork\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testMobileBytesTransfer\",\"failure_message\":\"expected to be at least: 1\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testMobileBytesTransfer\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerToggle\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange.Run level error reported reason: 'Instrumentation reported numtests=322 but only ran 318. There were 30 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_NotVvm\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_NotVvm\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_MissingValue\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_MissingValue\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testPermissionlessService_ignored\",\"failure_message\":\"java.lang.IllegalArgumentException: Invalid destinationAddress\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testPermissionlessService_ignored\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_originatingNumber_match_filtered\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_originatingNumber_match_filtered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_InvalidKeyValuePair\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_InvalidKeyValuePair\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerToggle\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange.Run level error reported reason: 'Instrumentation reported numtests=32 but only ran 27. There were 27 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testBytesTransferByTagAndMetered\",\"failure_message\":\"java.lang.AssertionError: On-device tests failed:\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testBytesTransferByTagAndMetered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_EmptyPrefix\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_EmptyPrefix\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MessageEndAfterClientPrefix\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MessageEndAfterClientPrefix\"},{\"modulename\":\"CtsStatsdAtomHostTestCases\",\"abi\":\"armeabi-v7a\",\"testCasename\":\"android.cts.statsdatom.net.BytesTransferredTest\",\"testname\":\"testMobileBytesTransfer\",\"failure_message\":\"java.lang.AssertionError: On-device tests failed:\",\"combinedName\":\"android.cts.statsdatom.net.BytesTransferredTest#testMobileBytesTransfer\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testServiceStateChange\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testSimStateChange.Run level error reported reason: 'Instrumentation reported numtests=322 but only ran 318. There were 30 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testServiceStateChange\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SubscriptionManagerTest\",\"testname\":\"testRestoreAllSimSpecificSettingsFromBackup\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.VisualVoicemailServiceTest#testPermissionlessService_ignored.Run level error reported reason: 'Instrumentation reported numtests=32 but only ran 27. There were 27 failures:\\r\",\"combinedName\":\"android.telephony.cts.SubscriptionManagerTest#testRestoreAllSimSpecificSettingsFromBackup\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SubscriptionManagerTest\",\"testname\":\"testRestoreAllSimSpecificSettingsFromBackup\",\"failure_message\":\"java.lang.AssertionError: expected:<false> but was:<true>\\r\",\"combinedName\":\"android.telephony.cts.SubscriptionManagerTest#testRestoreAllSimSpecificSettingsFromBackup\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MissingSecondColon\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MissingSecondColon\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.MmsTest\",\"testname\":\"testSendMmsMessage\",\"failure_message\":\"java.lang.AssertionError\\r\",\"combinedName\":\"android.telephony.cts.MmsTest#testSendMmsMessage\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.TelephonyManagerTestOnMockModem\",\"testname\":\"testRadioPowerWithFailureResults\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerToggle.Run level error reported reason: 'Instrumentation reported numtests=32 but only ran 27. There were 27 failures:\\r\",\"combinedName\":\"android.telephony.cts.TelephonyManagerTestOnMockModem#testRadioPowerWithFailureResults\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilter_originatingNumber_mismatch_notFiltered\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilter_originatingNumber_mismatch_notFiltered\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.SubscriptionManagerTest\",\"testname\":\"testRestoreAllSimSpecificSettingsFromBackup\",\"failure_message\":\"Test did not run due to instrumentation issue. Last executed test was android.telephony.cts.SubscriptionManagerTest#testGetSubscriptionIds.Run level error reported reason: 'Instrumentation reported numtests=880 but only ran 836. There were 314 failures:\\r\",\"combinedName\":\"android.telephony.cts.SubscriptionManagerTest#testRestoreAllSimSpecificSettingsFromBackup\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_PrefixMismatch\",\"failure_message\":\"java.lang.NullPointerException: Attempt to invoke virtual method 'void android.telephony.TelephonyManager.setVisualVoicemailSmsFilterSettings(android.telephony.VisualVoicemailSmsFilterSettings)' on a null object reference\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_PrefixMismatch\"},{\"modulename\":\"CtsTelephonyTestCases\",\"abi\":\"arm64-v8a\",\"testCasename\":\"android.telephony.cts.VisualVoicemailServiceTest\",\"testname\":\"testFilterFail_MissingFirstColon\",\"failure_message\":\"java.lang.RuntimeException: java.util.concurrent.TimeoutException\\r\",\"combinedName\":\"android.telephony.cts.VisualVoicemailServiceTest#testFilterFail_MissingFirstColon\"}],\"toolType\":\"CTS\",\"toolVersion\":\"13_r5\",\"modelName\":\"SM-X115\",\"androidVersion\":\"13\",\"productname\":\"gta9xx\",\"username\":\"ga\",\"planName\":\"cts\",\"fingerprint\":\"samsung/gta9xx/gta9:13/TP1A.220624.014/X115XXU1AWI2:user/release-keys\"}";
    
    public static void sent() throws MalformedURLException, ProtocolException, IOException {
        URL url = new URL("https://mobilerndhub.sec.samsung.net/gba/ticket/csccheckerwaiversuggetion.json");
        HttpURLConnection conn = (HttpURLConnection)url.openConnection();
        conn.setDoInput(true);
        conn.setDoOutput(true);
        conn.setRequestMethod("POST");
        conn.setUseCaches(false);
        conn.setRequestProperty("Content-Type", "application/json");
        conn.setRequestProperty("Accept", "application/json");
        conn.connect();
        
        OutputStream os = conn.getOutputStream();
        OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
        osw.write(json);
        osw.flush();
        osw.close();

        System.out.println("Request sent!" + json);
    };
    
    public static void receive() throws IOException, ClassNotFoundException {
        System.out.println("Start receive!");
        ServerSocket serverSocket = new ServerSocket(9105);
        System.out.println("Created serversocket!");
        Socket socket = serverSocket.accept();
        System.out.println("Accepted!");
        ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));
        Object obj = ois.readObject();
        System.out.println("OIS!");
        if (obj != null) {
            System.out.println(obj.toString());
        } else System.out.println("Object Input Stream Null!");
    };
    
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        sent();
        receive();
        
    }
}