input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetObjectId ( ) { org . jinstagram . realtime . SubscriptionResponseData fixture = new org . jinstagram . realtime . SubscriptionResponseData ( ) ; fixture . setCallbackUrl ( "" ) ; fixture . setObject ( "" ) ; fixture . setAspect ( "" ) ; fixture . setObjectId ( "" ) ; fixture . setId ( "" ) ; fixture . setType ( ... | org . junit . Assert . assertEquals ( "" , result ) |
shouldGetTimeOutWhenStatusDoneAndTimerMetricValueIsLifeTimeAndStatusDescriptorIsNew1 ( ) { when ( descriptor . getRunStats ( ) ) . thenReturn ( metricList ) ; when ( descriptor . getStatus ( ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . models . NEW ) ; when ( stat . getName ( ) ) . thenReturn ... | org . junit . Assert . assertThat ( runner . getTimeout ( ) , org . hamcrest . core . Is . is ( org . eclipse . che . ide . ext . runner . client . models . ALWAYS_ON ) ) |
getLastModifyTest ( ) { java . lang . String currentdir = com . att . aro . core . util . Util . getCurrentRunningDir ( ) ; long date = fileManager . getLastModified ( currentdir ) ; boolean ok = date > 0 ; "<AssertPlaceHolder>" ; } getLastModified ( java . lang . String ) { java . io . File file = new java . io . File... | org . junit . Assert . assertTrue ( ok ) |
testBestPathSelectionWithoutTieBreaking ( ) { _bestPathRib . mergeRoute ( _rb . build ( ) ) ; org . batfish . datamodel . BgpRoute bestPath = _rb . setLocalPreference ( 200 ) . build ( ) ; _bestPathRib . mergeRoute ( bestPath ) ; "<AssertPlaceHolder>" ; } getRoutes ( ) { return _routes ; } | org . junit . Assert . assertThat ( _bestPathRib . getRoutes ( ) , org . hamcrest . Matchers . contains ( bestPath ) ) |
testReverseArraySubsets ( ) { java . lang . Integer [ ] input = new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 } ; java . lang . Integer [ ] expected = new java . lang . Integer [ ] { 2 , 1 , 5 , 4 , 3 } ; com . killeent . Array . Array . reverse ( input , 0 , 1 ) ; com . killeent . Array . Array . reverse ( input ,... | org . junit . Assert . assertEquals ( expected , input ) |
testAvailableSinkBuilder ( ) { com . cloudera . flume . conf . FlumeConfiguration . get ( ) . setInt ( FlumeConfiguration . AGENT_FAILOVER_INITIAL_BACKOFF , 0 ) ; java . util . List < java . lang . String > names = java . util . Arrays . asList ( "first" , "second" , "third" , "fourth" , "fifth" ) ; java . lang . Strin... | org . junit . Assert . assertEquals ( ans [ i ] , val ) |
inverseMatching4 ( ) { dakara . eclipse . plugin . kavi . picklist . InputCommand inputCommand = dakara . eclipse . plugin . kavi . picklist . InputCommand . parse ( "!two!four" ) ; java . util . List < dakara . eclipse . plugin . stringscore . RankedItem < dakara . eclipse . plugin . kavi . picklist . ListRankAndSelec... | org . junit . Assert . assertEquals ( 8 , listItems . size ( ) ) |
test_PLP ( ) { cpu . stackPush ( 47 ) ; bus . loadProgram ( 40 ) ; cpu . step ( ) ; "<AssertPlaceHolder>" ; } getProcessorStatus ( ) { return state . getStatusFlag ( ) ; } | org . junit . Assert . assertEquals ( 47 , cpu . getProcessorStatus ( ) ) |
testEqualsWithNull ( ) { opennlp . tools . util . Span a = new opennlp . tools . util . Span ( 0 , 0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj instanceof opennlp . tools . lemmatizer . LemmaSample ) { opennlp . tools . lemmatizer . LemmaSample a = ... | org . junit . Assert . assertEquals ( a . equals ( null ) , false ) |
testSaslXOauth2Connection ( ) { try ( org . apache . qpid . jms . test . testpeer . TestAmqpPeer testPeer = new org . apache . qpid . jms . test . testpeer . TestAmqpPeer ( ) ) { java . lang . String user = "user" ; java . lang . String pass = "eyB1c2VyPSJ1c2VyIiB9" ; testPeer . expectSaslXOauth2 ( user , pass ) ; test... | org . junit . Assert . assertNull ( testPeer . getThrowable ( ) ) |
count ( ) { final java . lang . String sparql = "SELECT<sp>(count(?item)<sp>as<sp>?itemCount)<sp>{<sp>" + ( "?item<sp><urn:id><sp>?id<sp>.<sp>" + "}" ) ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final java . util . Collection <... | org . junit . Assert . assertEquals ( expectedResult , result ) |
getIntentName ( ) { final io . klerch . alexa . tellask . model . AlexaOutput output = io . klerch . alexa . tellask . model . AlexaOutput . ask ( "intentName" ) . build ( ) ; "<AssertPlaceHolder>" ; } getIntentName ( ) { return intentName ; } | org . junit . Assert . assertThat ( output . getIntentName ( ) , org . hamcrest . core . Is . is ( "intentName" ) ) |
testGetService ( ) { java . lang . String id = "dummy-service" ; flex . messaging . services . MessageService expected = new flex . messaging . services . MessageService ( ) ; expected . setId ( id ) ; broker . addService ( expected ) ; flex . messaging . services . Service actual = broker . getService ( id ) ; "<Asser... | org . junit . Assert . assertEquals ( expected , actual ) |
testProvider ( ) { startServer ( com . sun . jersey . osgi . tests . grizzly . GrizzlyWebProviderLifecycleTest . FileReferenceWriter . class , com . sun . jersey . osgi . tests . grizzly . GrizzlyWebProviderLifecycleTest . FileTypeResource . class ) ; com . sun . jersey . api . client . WebResource r = com . sun . jers... | org . junit . Assert . assertTrue ( f . exists ( ) ) |
shouldInstrumentStatementFunctionAssignment ( ) { java . lang . String source = "this.someFn()\n<sp>._renderItem<sp>=<sp>function()<sp>{};" ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[1]++;\nthis.so... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
testGetBusinessObjectDefinitionColumnsTrimParameters ( ) { businessObjectDefinitionColumnDaoTestHelper . createBusinessObjectDefinitionColumnEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME_2 ) , org . finra . herd . service . DESCRI... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKeys ( com . google . common . collect . Lists . newArrayList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME ) , new org . fi... |
get2DCoordinateCoverage_Full ( ) { org . openscience . cdk . interfaces . IAtomContainer container = new org . openscience . cdk . AtomContainer ( ) ; org . openscience . cdk . interfaces . IAtom atom1 = new org . openscience . cdk . Atom ( "C" ) ; org . openscience . cdk . interfaces . IAtom atom2 = new org . openscie... | org . junit . Assert . assertEquals ( GeometryTools . CoordinateCoverage . FULL , org . openscience . cdk . geometry . GeometryTools . get2DCoordinateCoverage ( container ) ) |
init ( ) { com . asakusafw . runtime . value . DoubleOption option = new com . asakusafw . runtime . value . DoubleOption ( ) ; "<AssertPlaceHolder>" ; } isNull ( ) { return nullValue ; } | org . junit . Assert . assertThat ( option . isNull ( ) , is ( true ) ) |
testGetXmlRoot ( ) { java . io . File registryFile = new java . io . File ( "src/test/resources/invalid.xml" ) ; "<AssertPlaceHolder>" ; } getXmlRoot ( java . io . File ) { org . jboss . forge . parser . xml . Node installed = null ; try { installed = org . jboss . forge . parser . xml . XMLParser . parse ( registryFil... | org . junit . Assert . assertNotNull ( org . jboss . forge . furnace . impl . addons . AddonRepositoryStateStrategyImpl . getXmlRoot ( registryFile ) ) |
testCtWithMultipleParams ( ) { final org . apache . deltaspike . core . util . metadata . builder . AnnotatedTypeBuilder < org . apache . deltaspike . test . api . metadata . AnnotatedTypeBuilderTest . TypeWithParamsInCt > builder = new org . apache . deltaspike . core . util . metadata . builder . AnnotatedTypeBuilder... | org . junit . Assert . assertNotNull ( newAt ) |
test ( ) { java . io . File file = new java . io . File ( ( ( ( ( net . openhft . chronicle . map . ChronicleMapImportExportTest . TMP ) + "/chronicle-map-" ) + ( java . lang . System . nanoTime ( ) ) ) + ".json" ) ) ; file . deleteOnExit ( ) ; net . openhft . chronicle . map . ChronicleMapBuilder < java . lang . Strin... | org . junit . Assert . assertEquals ( expected , actual ) |
toString_Info ( ) { org . oscm . internal . components . response . ReturnCode returnCode = new org . oscm . internal . components . response . ReturnCode ( ReturnType . INFO , "KEY" ) ; "<AssertPlaceHolder>" ; } hasToString ( ) { org . junit . Assert . assertThat ( new org . oscm . test . matchers . JavaMatchersTest .... | org . junit . Assert . assertThat ( returnCode , hasToString ( ) ) |
testAmp ( ) { java . lang . String markdown = "```\n&read_data\n```" ; java . lang . String html = "<pre><code<sp>class=\"hljs\">&read_data\n</code></pre>\n" ; java . lang . String result = org . support . project . knowledge . logic . MarkdownLogic . get ( ) . markdownToHtml ( markdown , MarkdownLogic . ENGINE_MAR... | org . junit . Assert . assertEquals ( html , result ) |
testNewForeign ( ) { final org . graalvm . polyglot . Source src = org . graalvm . polyglot . Source . newBuilder ( "sl" , "function<sp>getValue(type)<sp>{o<sp>=<sp>new(type);<sp>o.a<sp>=<sp>10;<sp>return<sp>o.value;}" , "testObject.sl" ) . buildLiteral ( ) ; context . eval ( src ) ; org . graalvm . polyglot . Value ge... | org . junit . Assert . assertEquals ( 20 , ret . asLong ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Forums_Create_Topic" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
implicitlyCastsByteToInt ( ) { org . teavm . flavour . expr . test . IntComputation c = parseExpr ( org . teavm . flavour . expr . test . IntComputation . class , "byteValue<sp>-<sp>3" ) ; vars . byteValue ( ( ( byte ) ( 8 ) ) ) ; "<AssertPlaceHolder>" ; } parseExpr ( java . lang . Class , java . lang . String ) { org ... | org . junit . Assert . assertThat ( c . compute ( ) , org . hamcrest . Matchers . is ( 5 ) ) |
shouldRetryWhenEndOffsetsThrowsTimeoutException ( ) { final int retries = 2 ; final java . util . concurrent . atomic . AtomicInteger numberOfCalls = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; consumer = new org . apache . kafka . clients . consumer . MockConsumer < byte [ ] , byte [ ] > ( org . apac... | org . junit . Assert . assertEquals ( numberOfCalls . get ( ) , retries ) |
testGetTweetWithGeolocation ( ) { twitter4j . Status st = twitterSearch . getTweet ( 18845491030L ) ; "<AssertPlaceHolder>" ; } getGeoLocation ( ) { return geoLocation ; } | org . junit . Assert . assertNotNull ( st . getGeoLocation ( ) ) |
testLldpToNodeConnectorRefNotLLDP ( ) { byte [ ] packetNotLLDP = new byte [ ] { 1 , 35 , 0 , 0 , 0 , 1 , ( ( byte ) ( 138 ) ) , ( ( byte ) ( 142 ) ) , ( ( byte ) ( 204 ) ) , ( ( byte ) ( 133 ) ) , ( ( byte ) ( 235 ) ) , 39 , ( ( byte ) ( 8 ) ) , ( ( byte ) ( 0 ) ) , 2 , 7 , 4 , 0 , 0 , 0 , 0 , 0 , 2 , 4 , 2 , 7 , 50 , ... | org . junit . Assert . assertNull ( nodeConnectorRef ) |
testRemove_firstElement ( ) { org . eclipse . rap . rwt . internal . remote . MessageFilter filter1 = createLoggingFilter ( "h1" ) ; org . eclipse . rap . rwt . internal . remote . MessageFilter filter2 = createLoggingFilter ( "h2" ) ; org . eclipse . rap . rwt . internal . remote . MessageChainElement element = org . ... | org . junit . Assert . assertEquals ( asList ( "h1" ) , log ) |
testAddEntryNonExistingAT ( ) { org . apache . directory . ldap . client . api . LdapConnection connection = getAdminConnection ( getLdapServer ( ) ) ; org . apache . directory . api . ldap . model . name . Dn dn = new org . apache . directory . api . ldap . model . name . Dn ( ( "cn=Kate<sp>Bush," + ( org . apache . d... | org . junit . Assert . assertNull ( entry ) |
testGetCompositeModel ( ) { System . out . println ( "getCompositeModel" ) ; kg . apc . jmeter . vizualizers . CompositeResultCollector instance = new kg . apc . jmeter . vizualizers . CompositeResultCollector ( ) ; kg . apc . jmeter . vizualizers . CompositeModel expResult = null ; kg . apc . jmeter . vizualizers . Co... | org . junit . Assert . assertEquals ( expResult , result ) |
testCopyConstructor ( ) { com . intuit . wasabi . experimentobjects . Context con = com . intuit . wasabi . experimentobjects . Context . newInstance ( "a$123_a" ) . build ( ) ; com . intuit . wasabi . experimentobjects . Context con2 = com . intuit . wasabi . experimentobjects . Context . from ( con ) . build ( ) ; "<... | org . junit . Assert . assertEquals ( con . getContext ( ) , con2 . getContext ( ) ) |
testGetImportsWhenDiagramIsNotPresent ( ) { stateProvider . withDiagram ( null ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . v1_1 . Import > actualImports = stateProvider . getImports ( ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . v1... | org . junit . Assert . assertEquals ( expectedImports , actualImports ) |
testStoragePolicyID ( ) { for ( byte i = 0 ; i < 16 ; i ++ ) { final org . apache . hadoop . hdfs . server . namenode . INodeFile f = org . apache . hadoop . hdfs . server . namenode . TestINodeFile . createINodeFile ( i ) ; "<AssertPlaceHolder>" ; } } getStoragePolicyID ( ) { byte id = getLocalStoragePolicyID ( ) ; if... | org . junit . Assert . assertEquals ( i , f . getStoragePolicyID ( ) ) |
testGetPrivilegeManager ( ) { org . apache . jackrabbit . api . security . authorization . PrivilegeManager pMgr = configuration . getPrivilegeManager ( org . mockito . Mockito . mock ( org . apache . jackrabbit . oak . api . Root . class ) , NamePathMapper . DEFAULT ) ; "<AssertPlaceHolder>" ; } getPrivilegeManager ( ... | org . junit . Assert . assertTrue ( ( pMgr instanceof org . apache . jackrabbit . oak . security . privilege . PrivilegeManagerImpl ) ) |
testSingleRelatedContentSearchRequestProcessorHandlerIsCreated ( ) { java . lang . System . setProperty ( ConfigurationConstants . PROPNAME_NUMBER_OF_SEARCHING_REQUEST_PROCESSORS , "1" ) ; org . greencheek . related . util . config . Configuration config = new org . greencheek . related . util . config . SystemProperti... | org . junit . Assert . assertTrue ( ( handler instanceof org . greencheek . related . searching . disruptor . requestprocessing . DisruptorBasedRelatedContentSearchRequestProcessorHandler ) ) |
shouldHashCodeReturnTheCorrectValue ( ) { int dimension = 5 ; org . uma . jmetal . util . point . Point point = new org . uma . jmetal . util . point . impl . ArrayPoint ( dimension ) ; point . setValue ( 0 , 1.0 ) ; point . setValue ( 1 , ( - 2.0 ) ) ; point . setValue ( 2 , 45.5 ) ; point . setValue ( 3 , ( - 323.234... | org . junit . Assert . assertEquals ( java . util . Arrays . hashCode ( array ) , point . hashCode ( ) ) |
testGetConnection ( ) { javax . net . SocketFactory socketFactory = createMock ( javax . net . SocketFactory . class ) ; java . net . Socket socket = createMock ( java . net . Socket . class ) ; expect ( socketFactory . createSocket ( isNull ( java . net . InetAddress . class ) , anyInt ( ) ) ) . andReturn ( socket ) ;... | org . junit . Assert . assertNotNull ( aSocket ) |
testMySQLDatabase ( ) { try { java . lang . String expectedSQL = ( org . pentaho . di . core . database . SelectCountIT . NonHiveSelect ) + ( org . pentaho . di . core . database . SelectCountIT . TableName ) ; org . pentaho . di . core . database . DatabaseMeta databaseMeta = new org . pentaho . di . core . database .... | org . junit . Assert . assertTrue ( sql . equalsIgnoreCase ( expectedSQL ) ) |
testDisabled ( ) { heapDump . setEnabled ( false ) ; "<AssertPlaceHolder>" ; } createDumpIfAppropriate ( long ) { if ( ! ( isEnabled ( ) ) ) { return false ; } synchronized ( this ) { if ( ( maxHeaps ) <= ( currentHeaps ) ) { return false ; } if ( ( currentTimeMillis - ( lastDumpMillis ) ) < ( quietPeriodMillis ) ) { r... | org . junit . Assert . assertThat ( heapDump . createDumpIfAppropriate ( 1 ) , org . hamcrest . core . Is . is ( false ) ) |
testParseNegativeReal ( ) { java . lang . String source = ( ( ( "-1" + ( getDecimalCharacter ( ) ) ) + "2323<sp>+<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "4343i" ; org . apache . commons . math3 . complex . Complex expected = new org . apache . commons . math3 . complex . Complex ( ( - 1.2323 ) , 1.4343 ) ; org . apa... | org . junit . Assert . assertEquals ( expected , actual ) |
invalidProxyFails ( ) { boolean caught = false ; java . lang . String url = "https://jsoup.org" ; try { org . jsoup . nodes . Document doc = org . jsoup . Jsoup . connect ( url ) . proxy ( "localhost" , 8889 ) . get ( ) ; } catch ( java . io . IOException e ) { caught = e instanceof java . net . ConnectException ; } "<... | org . junit . Assert . assertTrue ( caught ) |
writeToMmvShouldWriteTheCorrectContentToTheByteBuffer ( ) { io . pcp . parfait . dxm . InstanceDomain instanceDomain = mock ( io . pcp . parfait . dxm . InstanceDomain . class ) ; io . pcp . parfait . dxm . PcpString pcpString = mock ( io . pcp . parfait . dxm . PcpString . class ) ; java . nio . ByteBuffer byteBuffer ... | org . junit . Assert . assertArrayEquals ( expected , byteBuffer . array ( ) ) |
createDatabase ( ) { try { final java . lang . Boolean result = arangoDB . createDatabase ( BaseTest . TEST_DB ) ; "<AssertPlaceHolder>" ; } finally { try { arangoDB . db ( BaseTest . TEST_DB ) . drop ( ) ; } catch ( final com . arangodb . ArangoDBException e ) { } } } createDatabase ( java . lang . String ) { return e... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( true ) ) |
testMoreThan64FieldsMultipleFirings ( ) { final java . lang . StringBuilder fields = new java . lang . StringBuilder ( ) ; for ( int i = 10 ; i < 100 ; i ++ ) { fields . append ( "<sp>a" ) . append ( i ) . append ( "<sp>:<sp>int\n" ) ; } final java . lang . String str = ( ( ( ( ( ( ( ( ( ( ( ( "<sp>list.add(1);\n" 2 + ... | org . junit . Assert . assertEquals ( 10 , list . size ( ) ) |
testFindLatestCompletedInitialOcan ( ) { int facilityId1 = 100 ; int clientId1 = 111 ; java . lang . String assessmentStatus1 = "Completed" ; java . lang . String reasonForAssessment1 = "IA" ; java . util . Date created1 = new java . util . Date ( dfm . parse ( "20120310" ) . getTime ( ) ) ; java . util . Date created2... | org . junit . Assert . assertEquals ( expectedResult , result ) |
updateDesignation ( ) { sampleDesignation ( ) ; designation . setDescription ( "FORTESTING" ) ; designationService . updateDesignation ( designation ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; } | org . junit . Assert . assertEquals ( "FORTESTING" , designation . getDescription ( ) ) |
dontDiscardOutline ( ) { org . sejda . model . parameter . ExtractPagesParameters parameters = defaultCommandLine ( ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } discardOutline ( ) { return discardOutline ; } | org . junit . Assert . assertFalse ( parameters . discardOutline ( ) ) |
test_SingleFile ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2Vecto... | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
testLogErrorMessageWithException ( ) { java . lang . String message = ( testName . getMethodName ( ) ) + "<sp>Cleaned" ; org . mockito . Mockito . when ( mockHandler . isEnabled ( mockSlf4JLogger ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( mockScrubber . cleanMessage ( testName . getMethodName ( ) ) ) ... | org . junit . Assert . assertEquals ( Logger . EVENT_UNSPECIFIED . toString ( ) , markerCapture . getValue ( ) . getName ( ) ) |
testReset_String ( ) { fsb . reset ( "[%#04o]" ) . format ( ( ( long ) ( 10 ) ) ) ; fsb . reset ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "IsotopeContainer{" + "mass=" ) + ( masOs ) ) + ",<sp>intensity=" ) + ( inte ) ) + ",<sp>MF=" ) + ( getFormulasString ( ) ) ) + '}' ; } | org . junit . Assert . assertEquals ( "[%#04o]" , fsb . toString ( ) ) |
runBuildIndex ( ) { org . apache . hadoop . conf . Configuration conf = ivory . integration . IntegrationUtils . getBespinConfiguration ( ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( conf ) ; "<AssertPlaceHolder>" ; fs . delete ( new org . apache . hadoop . fs . Path ... | org . junit . Assert . assertTrue ( fs . exists ( collectionPath ) ) |
testConvertBlank ( ) { java . lang . Short result = underTest . convert ( "<sp>" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { if ( "S" . equalsIgnoreCase ( value ) ) { return Size . TINY ; } else if ( "M" . equalsIgnoreCase ( value ) ) { return Size . NORMAL ; } else if ( "L" . equalsIgnoreCase ( va... | org . junit . Assert . assertNull ( result ) |
testURLEncodedKey ( ) { java . lang . String urlKey = "http://example.com/foo" ; java . lang . StringBuilder path = new java . lang . StringBuilder ( ) ; path . append ( '/' ) ; path . append ( org . apache . hadoop . hbase . rest . TABLE ) ; path . append ( '/' ) ; path . append ( java . net . URLEncoder . encode ( ur... | org . junit . Assert . assertEquals ( 200 , response . getCode ( ) ) |
testRemoveApplicationContextListener_returnsFalseWhenInActive ( ) { applicationContext = org . eclipse . rap . rwt . internal . application . ApplicationContextImpl_Test . createApplicationContextSpy ( ) ; applicationContext . addApplicationContextListener ( appContextListener ) ; boolean result = applicationContext . ... | org . junit . Assert . assertFalse ( result ) |
testValidateStructure ( ) { com . bwssystems . domoticz . test . DomoticzDeviceConstructor aTestService = new com . bwssystems . domoticz . test . DomoticzDeviceConstructor ( ) ; "<AssertPlaceHolder>" ; } validateStructure ( ) { com . google . gson . Gson aGson ; com . bwssystems . HABridge . NamedIP anAddress = new co... | org . junit . Assert . assertEquals ( aTestService . validateStructure ( ) , true ) |
testDiscrete ( ) { int rows = 10 ; int cols = 5 ; java . util . List < edu . cmu . tetrad . graph . Node > variables = new java . util . LinkedList ( ) ; for ( int i = 0 ; i < cols ; i ++ ) { edu . cmu . tetrad . test . DiscreteVariable variable = new edu . cmu . tetrad . test . DiscreteVariable ( ( "X" + ( i + 1 ) ) ,... | org . junit . Assert . assertEquals ( dataSet , _dataSet ) |
test19_FbeforeD_EbeforeDafterOthers_DbeforeCafterE_BbeforeC ( ) { java . util . List < com . liferay . faces . util . config . internal . FacesConfigDescriptor > facesConfigDescriptors = new java . util . ArrayList < com . liferay . faces . util . config . internal . FacesConfigDescriptor > ( ) ; com . liferay . faces ... | org . junit . Assert . assertTrue ( message , assertion ) |
testRead ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . wire . Wire wire = createWire ( ) ; wire . write ( ) ; wire . write ( net . openhft . chronicle . wire . BinaryWireTest . BWKey . field1 ) ; wire . write ( ( ) -> "Test" ) ; checkAsText ( wire , "\"\":<sp>field1:<sp>Test:<sp>" , "\"\":... | org . junit . Assert . assertEquals ( 0 , bytes . readRemaining ( ) ) |
testDetermineDestinationOffsets_f1_BT_in ( ) { int [ ] [ ] expected_f1_BT_in_DestinationOffsets = new int [ ] [ ] { new int [ ] { 0 } , new int [ ] { 3000000 } , new int [ ] { 6000000 } } ; int [ ] rowOffsets = new int [ ] { 0 , 2000 , 4000 } ; int [ ] numberOfRows = new int [ ] { 2000 , 2000 , 2000 } ; int [ ] section... | org . junit . Assert . assertArrayEquals ( expected_f1_BT_in_DestinationOffsets [ i ] , actual_f1_BT_in_DestinationOffsets [ i ] ) |
legacy_testIsReadOnlyWhenTwoDescriptionProvidersHigherRankingIsNotReadOnly ( ) { org . eclipse . smarthome . core . types . StateDescription stateDescription1 = new org . eclipse . smarthome . core . types . StateDescription ( null , null , null , null , false , null ) ; org . eclipse . smarthome . core . types . State... | org . junit . Assert . assertThat ( finalStateDescription . isReadOnly ( ) , org . hamcrest . CoreMatchers . is ( stateDescription1 . isReadOnly ( ) ) ) |
injectIntoInt ( ) { org . eclipse . collections . api . map . MapIterable < java . lang . String , java . lang . Integer > map = this . newMapWithKeysValues ( "1" , 1 , "2" , 2 , "3" , 3 , "4" , 4 ) ; int actual = map . injectInto ( 0 , AddFunction . INTEGER_TO_INT ) ; "<AssertPlaceHolder>" ; } injectInto ( IV , org . ... | org . junit . Assert . assertEquals ( 10 , actual ) |
testGetRealSourceNode ( ) { org . talend . designer . core . ui . editor . cmd . ChangeValuesFromRepository changeValuesFromRepository = new org . talend . designer . core . ui . editor . cmd . ChangeValuesFromRepository ( elem , org . talend . designer . core . ui . editor . cmd . ChangeValuesFromRepositoryTest . conn... | org . junit . Assert . assertEquals ( changeValuesFromRepository . getRealSourceNode ( target ) , elem ) |
testShouldExecuteListenerExactlyOncePerEvent ( ) { java . util . concurrent . atomic . AtomicInteger count = com . liferay . repository . registry . test . RepositoryEventTestUtil . registerCounterRepositoryEventListener ( _defaultRepositoryEventRegistry , RepositoryEventType . Add . class , com . liferay . portal . ke... | org . junit . Assert . assertEquals ( randomInt , count . get ( ) ) |
getBeanofSameTypeTest ( ) { factory . method . ClientServiceFactoryMethod factory = ( ( factory . method . ClientServiceFactoryMethod ) ( applicationContext . getBean ( "clientServiceFactoryMethod" ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( factory ) |
intervalAsArray ( ) { "<AssertPlaceHolder>" ; } toArray ( int , int ) { return com . gs . collections . impl . list . Interval . fromTo ( from , to ) . toArray ( ) ; } | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 } , com . gs . collections . impl . list . Interval . toArray ( 1 , 5 ) ) |
addDaysToDt ( ) { java . util . Calendar c = java . util . Calendar . getInstance ( ) ; c . setTime ( new java . util . Date ( ) ) ; c . add ( Calendar . DAY_OF_MONTH , 10 ) ; int future = c . get ( Calendar . DAY_OF_MONTH ) ; c . setTime ( org . candlepin . util . Util . addDaysToDt ( 10 ) ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertEquals ( future , c . get ( Calendar . DAY_OF_MONTH ) ) |
testUpgradeOnlyAppliedOnce ( ) { upgradeService . start ( ) ; java . util . Map < java . lang . String , java . lang . String > upgradedVersions = com . google . common . collect . ImmutableMap . of ( "foo" , "1.2" , "bar" , "1.1" , "wibble" , "2.0" ) ; "<AssertPlaceHolder>" ; upgradeService . stop ( ) ; when ( modelVe... | org . junit . Assert . assertThat ( verifyModelVersionsSaved ( ) , org . hamcrest . Matchers . is ( upgradedVersions ) ) |
testAttributeNotificationDisabled ( ) { org . apache . aries . jmx . framework . StateConfig stateConfig = new org . apache . aries . jmx . framework . StateConfig ( ) ; stateConfig . setAttributeChangeNotificationEnabled ( false ) ; java . util . List < javax . management . AttributeChangeNotification > attributeChang... | org . junit . Assert . assertEquals ( 0 , attributeChanges . size ( ) ) |
mustProperlyParsePacketIfItHasExtraData ( ) { com . offbynull . portmapper . mappers . pcp . externalmessages . PreferFailurePcpOption origOpt = new com . offbynull . portmapper . mappers . pcp . externalmessages . PreferFailurePcpOption ( ) ; byte [ ] buffer = origOpt . dump ( ) ; buffer = java . util . Arrays . copyO... | org . junit . Assert . assertEquals ( 2 , parsedOpt . getCode ( ) ) |
instancePrimitivesAreEligible ( ) { java . util . List < java . lang . reflect . Field > field = net . openhft . lang . io . serialization . direct . DirectSerializationFilterTest . fieldsNamed ( "intField" ) ; "<AssertPlaceHolder>" ; } stopAtFirstIneligibleField ( java . util . List ) { java . util . ArrayList < java ... | org . junit . Assert . assertEquals ( field , net . openhft . lang . io . serialization . direct . DirectSerializationFilter . stopAtFirstIneligibleField ( field ) ) |
testUnion ( ) { org . apache . hadoop . hive . conf . HiveConf conf = new org . apache . hadoop . hive . conf . HiveConf ( ) ; org . apache . hadoop . hive . ql . session . SessionState ss = org . mockito . Mockito . spy ( org . apache . hadoop . hive . ql . session . SessionState . start ( conf ) . get ( ) ) ; org . a... | org . junit . Assert . assertEquals ( expected , actual ) |
testToOriginal ( ) { java . lang . String originalId = "064c292e02db027c22g" ; org . hawkular . apm . server . api . model . zipkin . Span span = new org . hawkular . apm . server . api . model . zipkin . Span ( null , clientAnnotations ( ) ) ; span . setId ( originalId ) ; span . setId ( ( ( span . getId ( ) ) + ( Spa... | org . junit . Assert . assertEquals ( originalId , org . hawkular . apm . server . api . utils . zipkin . SpanUniqueIdGenerator . toOriginal ( span ) ) |
testNextValueBeforeStart ( ) { org . roaringbitmap . buffer . MappeableArrayContainer container = new org . roaringbitmap . buffer . MappeableArrayContainer ( java . nio . ShortBuffer . wrap ( new short [ ] { 10 , 20 , 30 } ) , 3 ) ; "<AssertPlaceHolder>" ; } nextValue ( int ) { short key = highbits ( fromValue ) ; int... | org . junit . Assert . assertEquals ( 10 , container . nextValue ( ( ( short ) ( 5 ) ) ) ) |
testNoSuchProduct ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . datamodel . Product doramichanProduct = new net . violet . platform . datamodel . mock . ProductMock ( 1 , "Doramichan<sp>et<sp>Anpainman" ) ; final java . util . List < net . violet . p... | org . junit . Assert . assertNotNull ( theResult ) |
testNullFieldShouldNotMatch ( ) { final java . lang . String fieldName = "nullfield" ; final org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setField ( fieldName ) ; rule . setValue ( "^foo" ) ; final org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( fieldN... | org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) ) |
testWithHtmlStylesheetOption ( ) { java . nio . file . Path stylesheetPath = java . nio . file . Paths . get ( java . lang . System . getProperty ( "user.dir" ) , "target" , ( ( japicmp . output . xml . XmlOutputGeneratorTest . class . getSimpleName ( ) ) + "_with.css" ) ) ; java . nio . file . Path htmlReportPath = ja... | org . junit . Assert . assertThat ( foundStyleSheet , org . hamcrest . core . Is . is ( true ) ) |
rulesSyncResultTest ( ) { org . openkilda . northbound . dto . v1 . switches . RulesSyncResult dto = new org . openkilda . northbound . dto . v1 . switches . RulesSyncResult ( java . util . Collections . singletonList ( 0L ) , java . util . Collections . singletonList ( 1L ) , java . util . Collections . singletonList ... | org . junit . Assert . assertEquals ( dto , pass ( dto , org . openkilda . northbound . dto . v1 . switches . RulesSyncResult . class ) ) |
testPrepareFile ( ) { final java . util . HashMap < ch . cyberduck . core . Path , ch . cyberduck . core . Path > files = new java . util . HashMap < ch . cyberduck . core . Path , ch . cyberduck . core . Path > ( ) ; final ch . cyberduck . core . Path source = new ch . cyberduck . core . Path ( "a" , java . util . Enu... | org . junit . Assert . assertEquals ( 1L , status . getLength ( ) ) |
testRemediationFunctionlinearWithOffset ( ) { remediation . func = "somethingElse" ; remediation . linearFactor = "2<sp>mn" ; remediation . linearOffset = "2<sp>mn" ; org . sonar . api . server . rule . RulesDefinition . DebtRemediationFunctions functions = mock ( org . sonar . api . server . rule . RulesDefinition . D... | org . junit . Assert . assertEquals ( "2<sp>min" , function . coefficient ( ) ) |
testValidateLimits13 ( ) { java . lang . String string = new java . lang . String ( new int [ ] { 91 } , 0 , 1 ) ; boolean result = org . oscm . validator . ADMValidator . containsOnlyValidIdChars ( string ) ; "<AssertPlaceHolder>" ; } containsOnlyValidIdChars ( java . lang . String ) { if ( value == null ) { return tr... | org . junit . Assert . assertTrue ( result ) |
passesFilter_valueIsInRange_shouldBeTrue ( ) { com . vaadin . v7 . data . Item item = itemWithPropertyValue ( "foo" , 15 ) ; com . vaadin . v7 . data . util . filter . Between between = new com . vaadin . v7 . data . util . filter . Between ( "foo" , 1 , 30 ) ; "<AssertPlaceHolder>" ; } passesFilter ( java . lang . Obj... | org . junit . Assert . assertTrue ( between . passesFilter ( "foo" , item ) ) |
testDetachDisk_Operation ( ) { org . easymock . EasyMock . expect ( computeRpcMock . detachDisk ( com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID . getZone ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID . getInstance ( ) , "device" , com . google . cloud . ... | org . junit . Assert . assertEquals ( zoneOperation , compute . detachDisk ( com . google . cloud . compute . deprecated . ComputeImplTest . INSTANCE_ID , "device" ) ) |
convertJsonToObject ( ) { customer = com . baeldung . utility . SimpleDataGeneration . generateData ( ) ; dataJson = xstream . toXML ( customer ) ; customer = ( ( com . baeldung . pojo . Customer ) ( xstream . fromXML ( dataJson ) ) ) ; System . out . println ( customer ) ; "<AssertPlaceHolder>" ; } generateData ( ) { ... | org . junit . Assert . assertNotNull ( customer ) |
testReshape2 ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; int [ ] origShape = new int [ ] { 3 , 4 , 5 } ; org . nd4j . linalg . api . ndarray . INDArray inArr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 60 , 60 ) . reshape ( origShape ) ; for ( int [ ] toShape : new int [... | org . junit . Assert . assertEquals ( exp , out ) |
testGetTypeInfoOfGuid ( ) { com . sun . jna . platform . win32 . COM . ITypeLib shellTypeLib = loadShellTypeLib ( ) ; com . sun . jna . platform . win32 . Guid . GUID iFolderViewOC = new com . sun . jna . platform . win32 . Guid . GUID ( "{9BA05970-F6A8-11CF-A442-00A0C90A8F39}" ) ; com . sun . jna . ptr . PointerByRefe... | org . junit . Assert . assertTrue ( com . sun . jna . platform . win32 . COM . COMUtils . SUCCEEDED ( hr ) ) |
shouldReturnProperOffsetWhenParametersAreNormal ( ) { java . lang . Integer originalOffset = 10 ; java . lang . Integer originalLimit = 100 ; java . lang . Integer newOffset = org . openstack . atlas . api . helpers . PaginationHelper . calculateNextOffset ( originalOffset , originalLimit ) ; final java . lang . Intege... | org . junit . Assert . assertEquals ( expectedOffset , newOffset ) |
testSimpleCondition ( ) { java . util . Set < io . cdap . cdap . etl . proto . Connection > connections = com . google . common . collect . ImmutableSet . of ( new io . cdap . cdap . etl . proto . Connection ( "file" , "csv" ) , new io . cdap . cdap . etl . proto . Connection ( "csv" , "condition" ) , new io . cdap . c... | org . junit . Assert . assertEquals ( actual , expected ) |
testSleepSwitchesNoTime ( ) { final java . util . List < net . violet . platform . util . SleepTime . SleepSwitch > theSwitches = testSleepSwitches ( StringShop . EMPTY_STRING , StringShop . EMPTY_STRING , StringShop . EMPTY_STRING , StringShop . EMPTY_STRING , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . m... | org . junit . Assert . assertEquals ( 0 , theSwitches . size ( ) ) |
testToStringWithEmptyWpaSecurity ( ) { org . eclipse . kura . core . net . WifiAccessPointImpl ap = new org . eclipse . kura . core . net . WifiAccessPointImpl ( "ssid" ) ; ap . setWpaSecurity ( java . util . EnumSet . noneOf ( org . eclipse . kura . net . wifi . WifiSecurity . class ) ) ; java . lang . String expected... | org . junit . Assert . assertEquals ( expected , ap . toString ( ) ) |
testGetExpectedDatasetbyId ( ) { final org . esa . beam . dataio . ExpectedDataset expectedDataset = new org . esa . beam . dataio . ExpectedDataset ( ) ; expectedDataset . setId ( "identifier" ) ; definition . addExpectedDataset ( expectedDataset ) ; final org . esa . beam . dataio . ExpectedDataset dataset = definiti... | org . junit . Assert . assertNotNull ( dataset ) |
testFilterByOne ( ) { io . katharsis . queryspec . QuerySpec expectedSpec = new io . katharsis . queryspec . QuerySpec ( io . katharsis . resource . mock . models . Task . class ) ; expectedSpec . addFilter ( new io . katharsis . queryspec . FilterSpec ( java . util . Arrays . asList ( "name" ) , io . katharsis . query... | org . junit . Assert . assertEquals ( expectedSpec , actualSpec ) |
testBuildWithParameters ( ) { org . lnu . is . domain . department . Department parent = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . department . type . DepartmentType departmentType = new org . lnu . is . domain . department . type . DepartmentType ( ) ; org . lnu . is . domai... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
keyRecoveryWithEncryptedKey ( ) { com . google . dogecoin . core . ECKey unencryptedKey = new com . google . dogecoin . core . ECKey ( ) ; org . spongycastle . crypto . params . KeyParameter aesKey = keyCrypter . deriveKey ( com . google . dogecoin . core . ECKeyTest . PASSWORD1 ) ; com . google . dogecoin . core . ECK... | org . junit . Assert . assertTrue ( found ) |
hasSubscriptionOwnerRole_BROKER_MANAGER ( ) { org . oscm . domobjects . PlatformUser user = createUserWithRole ( UserRoleType . BROKER_MANAGER ) ; "<AssertPlaceHolder>" ; } hasSubscriptionOwnerRole ( ) { for ( org . oscm . domobjects . RoleAssignment roleAssignment : assignedRoles ) { if ( ( ( ( roleAssignment . getRol... | org . junit . Assert . assertFalse ( user . hasSubscriptionOwnerRole ( ) ) |
test ( ) { boolean passed = true ; java . lang . String cacheSize = "20480" ; int threads = 10 ; java . lang . Thread [ ] t = new java . lang . Thread [ threads ] ; java . lang . System . setProperty ( "com.arjuna.ats.internal.arjuna.objectstore.cacheStore.size" , cacheSize ) ; com . arjuna . ats . arjuna . objectstore... | org . junit . Assert . assertTrue ( passed ) |
testDeleteRecordSetDeletesRecordSetVersions ( ) { com . liferay . dynamic . data . mapping . model . DDMForm ddmStructureDDMForm = com . liferay . dynamic . data . mapping . test . util . DDMFormTestUtil . createDDMForm ( "Field" ) ; com . liferay . dynamic . data . lists . model . DDLRecordSet ddlRecordSet = addRecord... | org . junit . Assert . assertEquals ( 0 , actualCount ) |
testETLSplitStrategyForACID ( ) { hiveConf . setVar ( HiveConf . ConfVars . HIVE_ORC_SPLIT_STRATEGY , "ETL" ) ; hiveConf . setBoolVar ( HiveConf . ConfVars . HIVEOPTINDEXFILTER , true ) ; runStatementOnDriver ( ( ( "insert<sp>into<sp>" + ( org . apache . hadoop . hive . ql . TestTxnCommands2 . Table . ACIDTBL ) ) + "<s... | org . junit . Assert . assertEquals ( org . apache . hadoop . hive . ql . TestTxnCommands2 . stringifyValues ( resultData ) , rs ) |
testHashCode ( ) { java . io . File harFile = new java . io . File ( "src/test/resources/sstoehr.har" ) ; de . sstoehr . harreader . model . Har har1 = harReader . readFromFile ( harFile ) ; de . sstoehr . harreader . model . Har har2 = harReader . readFromFile ( harFile ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { ret... | org . junit . Assert . assertEquals ( har1 . hashCode ( ) , har2 . hashCode ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.