input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
verifyValidCreditCardWithCustomVerificationAmount ( ) { com . braintreegateway . integrationtest . Customer customer = gateway . customer ( ) . create ( new com . braintreegateway . integrationtest . CustomerRequest ( ) ) . getTarget ( ) ; com . braintreegateway . integrationtest . CreditCardRequest request = new com . braintreegateway . integrationtest . CreditCardRequest ( ) . customerId ( customer . getId ( ) ) . cardholderName ( "John<sp>Doe" ) . cvv ( "123" ) . number ( "4111111111111111" ) . expirationDate ( "05/12" ) . options ( ) . verifyCard ( true ) . verificationAmount ( "1.02" ) . done ( ) ; com . braintreegateway . integrationtest . Result < com . braintreegateway . integrationtest . CreditCard > result = gateway . creditCard ( ) . create ( request ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { return success ; }
org . junit . Assert . assertTrue ( result . isSuccess ( ) )
testSetStringIfNotEmpty ( ) { java . lang . String key = "optionalProperty" ; java . lang . String value = "someValue" ; getSettings ( ) . setString ( key , value ) ; getSettings ( ) . setStringIfNotEmpty ( key , "" ) ; java . lang . String expResults = getSettings ( ) . getString ( key ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return java . lang . System . getProperty ( key , props . getProperty ( key ) ) ; }
org . junit . Assert . assertEquals ( expResults , value )
testGetTouchStoneResultConditionChildValue ( ) { hudson . model . Result parentResultCondition = hudson . model . Result . SUCCESS ; hudson . model . Result childResultCondition = hudson . model . Result . FAILURE ; hudson . matrix . MatrixProject parentProject = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "parent" ) ; parentProject . setTouchStoneResultCondition ( parentResultCondition ) ; hudson . matrix . MatrixProject childProject1 = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "child1" ) ; childProject1 . setCascadingProject ( parentProject ) ; childProject1 . setTouchStoneResultCondition ( childResultCondition ) ; "<AssertPlaceHolder>" ; } getTouchStoneResultCondition ( ) { return hudson . util . CascadingUtil . getResultProjectProperty ( this , hudson . matrix . MatrixProject . TOUCH_STONE_RESULT_CONDITION_PROPERTY_NAME ) . getValue ( ) ; }
org . junit . Assert . assertEquals ( childProject1 . getTouchStoneResultCondition ( ) , childResultCondition )
testGetBrokenMapping ( ) { org . apache . metron . indexing . dao . AccessConfig accessConfig = new org . apache . metron . indexing . dao . AccessConfig ( ) ; java . util . Map < java . lang . String , java . lang . Object > globalConfig = new java . util . HashMap ( ) ; globalConfig . put ( org . apache . metron . solr . SolrConstants . SOLR_ZOOKEEPER , org . apache . metron . solr . integration . SolrRetrieveLatestIntegrationTest . solrComponent . getZookeeperUrl ( ) ) ; accessConfig . setGlobalConfigSupplier ( ( ) -> globalConfig ) ; accessConfig . setIndexSupplier ( ( s ) -> null ) ; org . apache . metron . solr . integration . SolrRetrieveLatestIntegrationTest . dao = new org . apache . metron . solr . dao . SolrDao ( ) ; org . apache . metron . solr . integration . SolrRetrieveLatestIntegrationTest . dao . init ( accessConfig ) ; org . apache . metron . indexing . dao . update . Document actual = org . apache . metron . solr . integration . SolrRetrieveLatestIntegrationTest . dao . getLatest ( "message_1_bro" , org . apache . metron . solr . integration . SolrRetrieveLatestIntegrationTest . TEST_SENSOR ) ; "<AssertPlaceHolder>" ; } getLatest ( java . lang . String , java . lang . String ) { return this . solrRetrieveLatestDao . getLatest ( guid , sensorType ) ; }
org . junit . Assert . assertNull ( actual )
meets ( ) { com . cetsoft . imcache . cache . search . criteria . GTCriteria criteria = new com . cetsoft . imcache . cache . search . criteria . GTCriteria ( "a" , expectedValue ) ; doReturn ( result ) . when ( cacheIndex ) . greaterThan ( expectedValue ) ; java . util . List < java . lang . Object > actualResult = criteria . meets ( cacheIndex ) ; verify ( cacheIndex ) . greaterThan ( expectedValue ) ; "<AssertPlaceHolder>" ; } greaterThan ( java . lang . Object ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( result , actualResult )
testCapitalizeFirstLetterWithEmpty ( ) { "<AssertPlaceHolder>" ; } capitalizeFirstLetter ( java . lang . String ) { if ( au . gov . ga . earthsci . worldwind . common . util . Util . isBlank ( s ) ) { return s ; } return ( s . substring ( 0 , 1 ) . toUpperCase ( ) ) + ( s . substring ( 1 ) ) ; }
org . junit . Assert . assertEquals ( "" , au . gov . ga . earthsci . worldwind . common . util . Util . capitalizeFirstLetter ( "" ) )
executeWithStringForSuccess ( ) { setupValuesWithString ( ) ; when ( currentStep . getAllData ( eq ( "context" ) ) ) . then ( ( invocation ) -> { LinkedList < IData < ai . labs . models . Context > > ret = new ai . labs . behavior . impl . conditions . LinkedList < > ( ) ; ret . add ( new ai . labs . behavior . impl . conditions . MockData < > ( "context:someContextKey" , new ai . labs . models . Context ( Context . ContextType . string , "someString" ) ) ) ; return ret ; } ) ; ai . labs . behavior . impl . conditions . IBehaviorCondition . ExecutionState actualExecutionState = contextMatcher . execute ( conversationMemory , new ai . labs . behavior . impl . conditions . LinkedList ( ) ) ; "<AssertPlaceHolder>" ; } execute ( ai . labs . memory . IConversationMemory , java . util . List ) { if ( trace . contains ( this ) ) { throw throwInfiniteLoopError ( trace ) ; } else { trace . add ( this ) ; ai . labs . behavior . impl . conditions . IBehaviorCondition . ExecutionState state = IBehaviorCondition . ExecutionState . NOT_EXECUTED ; for ( ai . labs . behavior . impl . conditions . IBehaviorCondition condition : conditions ) { condition . execute ( memory , trace ) ; if ( ( condition . getExecutionState ( ) ) == ( IBehaviorCondition . ExecutionState . FAIL ) ) { state = IBehaviorCondition . ExecutionState . FAIL ; break ; } else if ( ( condition . getExecutionState ( ) ) == ( IBehaviorCondition . ExecutionState . ERROR ) ) { state = IBehaviorCondition . ExecutionState . ERROR ; break ; } } java . util . List < ai . labs . behavior . impl . BehaviorRule > tmp = new java . util . LinkedList ( trace ) ; trace . clear ( ) ; trace . addAll ( tmp . subList ( 0 , tmp . indexOf ( this ) ) ) ; if ( state != ( IBehaviorCondition . ExecutionState . NOT_EXECUTED ) ) return state ; return IBehaviorCondition . ExecutionState . SUCCESS ; } }
org . junit . Assert . assertEquals ( IBehaviorCondition . ExecutionState . SUCCESS , actualExecutionState )
testTwoFilesInSameProjectWithLinkingError ( ) { createSimpleProjectWithXtextNature ( "foo" ) ; createFile ( ( "foo/foo" + ( F_EXT ) ) , "object<sp>Foo<sp>" ) ; org . eclipse . core . resources . IFile file = createFile ( ( "foo/bar" + ( F_EXT ) ) , "object<sp>Bar<sp>references<sp>Fuu" ) ; build ( ) ; "<AssertPlaceHolder>" ; } countMarkers ( org . eclipse . core . resources . IFile ) { return file . findMarkers ( EValidator . MARKER , true , org . eclipse . core . resources . IResource . DEPTH_INFINITE ) . length ; }
org . junit . Assert . assertEquals ( 1 , countMarkers ( file ) )
testMaxNestedDepth ( ) { int MAX_MAP_DEPTH = ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . MAX_JSON_PATH_DEPTH ) - 1 ; software . amazon . awssdk . services . dynamodb . model . AttributeValue nestedJson = buildNestedMapAttribute ( MAX_MAP_DEPTH ) ; java . util . Map < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > item = new java . util . HashMap < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > ( ) ; item . put ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . HASH , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . s ( "foo" ) . build ( ) ) ; item . put ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . JSON_MAP_ATTRIBUTE , nestedJson ) ; software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . ddb . putItem ( software . amazon . awssdk . services . dynamodb . model . PutItemRequest . builder ( ) . tableName ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . TABLE ) . item ( item ) . build ( ) ) ; software . amazon . awssdk . services . dynamodb . model . GetItemResponse itemResult = software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . ddb . getItem ( software . amazon . awssdk . services . dynamodb . model . GetItemRequest . builder ( ) . tableName ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . TABLE ) . key ( java . util . Collections . singletonMap ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . HASH , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . s ( "foo" ) . build ( ) ) ) . build ( ) ) ; int mapDepth = computeDepthOfNestedMapAttribute ( itemResult . item ( ) . get ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . JSON_MAP_ATTRIBUTE ) ) ; "<AssertPlaceHolder>" ; software . amazon . awssdk . services . dynamodb . model . AttributeValue nestedJson_OverLimit = buildNestedMapAttribute ( ( MAX_MAP_DEPTH + 1 ) ) ; java . util . Map < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > item_OverLimit = new java . util . HashMap < java . lang . String , software . amazon . awssdk . services . dynamodb . model . AttributeValue > ( ) ; item_OverLimit . put ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . HASH , software . amazon . awssdk . services . dynamodb . model . AttributeValue . builder ( ) . s ( "foo" ) . build ( ) ) ; item_OverLimit . put ( "json" , nestedJson_OverLimit ) ; try { software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . ddb . putItem ( software . amazon . awssdk . services . dynamodb . model . PutItemRequest . builder ( ) . tableName ( software . amazon . awssdk . services . dynamodb . NestedJsonDocumentIntegrationTest . TABLE ) . item ( item_OverLimit ) . build ( ) ) ; org . junit . Assert . fail ( "ValidationException<sp>is<sp>expected,<sp>since<sp>the<sp>depth<sp>exceeds<sp>the<sp>service<sp>limit." ) ; } catch ( software . amazon . awssdk . core . exception . SdkServiceException expected ) { } } get ( K ) { return map . computeIfAbsent ( key , this :: newPool ) ; }
org . junit . Assert . assertEquals ( MAX_MAP_DEPTH , mapDepth )
testRegexpSubstrFunction2 ( ) { long ts = nextTimestamp ( ) ; java . lang . String url = getUrl ( ) ; java . util . Properties props = org . apache . phoenix . util . PropertiesUtil . deepCopy ( org . apache . phoenix . end2end . TEST_PROPERTIES ) ; props . setProperty ( PhoenixRuntime . CURRENT_SCN_ATTRIB , java . lang . Long . toString ( ts ) ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( url , props ) ; java . lang . String ddl = "create<sp>table<sp>t<sp>(k<sp>INTEGER<sp>NOT<sp>NULL<sp>PRIMARY<sp>KEY,<sp>name<sp>VARCHAR)" ; conn . createStatement ( ) . execute ( ddl ) ; conn . close ( ) ; java . lang . String dml = "upsert<sp>into<sp>t<sp>values(?,?)" ; props . setProperty ( PhoenixRuntime . CURRENT_SCN_ATTRIB , java . lang . Long . toString ( ( ts + 2 ) ) ) ; conn = java . sql . DriverManager . getConnection ( url , props ) ; java . sql . PreparedStatement stmt = conn . prepareStatement ( dml ) ; java . lang . String [ ] values = new java . lang . String [ ] { "satax" , "jruls" , "hrjcu" , "yqtrv" , "jjcvw" } ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { stmt . setInt ( 1 , ( i + 1 ) ) ; stmt . setString ( 2 , values [ i ] ) ; stmt . execute ( ) ; } conn . commit ( ) ; conn . close ( ) ; java . lang . String query = "select<sp>regexp_substr(name,'[^s]+',1)<sp>from<sp>t<sp>limit<sp>5" ; props . setProperty ( PhoenixRuntime . CURRENT_SCN_ATTRIB , java . lang . Long . toString ( ( ts + 5 ) ) ) ; conn = java . sql . DriverManager . getConnection ( url , props ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( query ) ; int count = 0 ; java . lang . String [ ] results = new java . lang . String [ ] { "atax" , "jrul" , "hrjcu" , "yqtrv" , "jjcvw" } ; while ( rs . next ( ) ) { "<AssertPlaceHolder>" ; count ++ ; } } getString ( java . lang . String ) { return getString ( findColumn ( columnLabel ) ) ; }
org . junit . Assert . assertEquals ( results [ count ] , rs . getString ( 1 ) )
order_list_of_strings_alphabetically_case_insensitive ( ) { java . util . List < java . lang . String > TOP_RATED_CENTERS = com . google . common . collect . Lists . newArrayList ( "Dawson" , "Gatski" , "Langer" , "Hein" , "Frankie<sp>Baggadonuts" , "Turner" , "Trafton" , "Stephenson" , "Ringo" , "Dawson" 0 , "Webster" ) ; java . lang . String topNameAlphabetically = com . google . common . collect . Ordering . from ( String . CASE_INSENSITIVE_ORDER ) . min ( TOP_RATED_CENTERS ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "Dawson" , topNameAlphabetically )
testAllowEmptyOutputEx ( ) { javax . mail . internet . MimeMessage m = new javax . mail . internet . MimeMessage ( javax . mail . internet . MimeMultipartPropertyTest . s ) ; javax . mail . internet . MimeMultipart mp = new javax . mail . internet . MimeMultipart ( ) ; m . setContent ( mp ) ; m . writeTo ( new com . sun . mail . test . NullOutputStream ( ) ) ; "<AssertPlaceHolder>" ; } writeTo ( javax . mail . internet . OutputStream ) { javax . mail . internet . MimeBodyPart . writeTo ( this , os , null ) ; }
org . junit . Assert . assertTrue ( false )
testParsing ( ) { com . samczsun . skype4j . formatting . Message message = com . samczsun . skype4j . formatting . Message . create ( ) . with ( com . samczsun . skype4j . formatting . Text . plain ( "Plain" ) ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "<blink>Blink</blink>" 7 ) . withBold ( ) . append ( "<blink>Blink</blink>" 4 ) . withItalic ( ) ) . with ( Text . NEW_LINE ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "google" ) . withLink ( "http://google.com" ) ) . with ( Text . BLANK ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "Strikethrough" ) . withStrikethrough ( ) ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "Blink" ) . withBlink ( ) ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "Underline" ) . withUnderline ( ) ) . with ( com . samczsun . skype4j . formatting . Text . rich ( "Black" ) . withColor ( Color . BLACK ) . withSize ( 10 ) ) ; java . lang . String html = ( ( ( ( ( "<blink>Blink</blink>" 5 + ( com . samczsun . skype4j . formatting . Text . NEW_LINE ) ) + "<blink>Blink</blink>" 6 http : "<AssertPlaceHolder>" ; } fromHtml ( java . lang . String ) { final com . samczsun . skype4j . formatting . Message parsed = com . samczsun . skype4j . formatting . Message . create ( ) ; parsed . with ( com . samczsun . skype4j . formatting . RichText . fromHtml ( text ) ) ; return parsed ; }
org . junit . Assert . assertEquals ( message , com . samczsun . skype4j . formatting . Message . fromHtml ( html ) )
testHybridisationSp3d4T ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( HYBRIDISATION_NUMBER , 7 ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; when ( atom . getHybridization ( ) ) . thenReturn ( IAtomType . Hybridization . SP3D4 ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertTrue ( expr . matches ( atom ) )
test_all ( ) { java . lang . String address = "00-03-47-73-dd-a5" ; bb . net . EthernetMacAddress ethernetMacAddress = new bb . net . EthernetMacAddress ( address ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "Geomshape:<sp>" + ( rectangle ) ; }
org . junit . Assert . assertEquals ( address , ethernetMacAddress . toString ( ) )
testMalformedURLException ( ) { oozieUrl = "one-malformed-url" ; namedCluster = mock ( org . pentaho . big . data . api . cluster . NamedCluster . class ) ; when ( namedCluster . getOozieUrl ( ) ) . thenReturn ( oozieUrl ) ; org . pentaho . runtime . test . result . RuntimeTestResultSummary runtimeTestResultSummary = pingOozieHostTest . runTest ( namedCluster ) ; verifyRuntimeTestResultEntry ( runtimeTestResultSummary . getOverallStatusEntry ( ) , RuntimeTestEntrySeverity . FATAL , messageGetter . getMessage ( PingOozieHostTest . PING_OOZIE_HOST_TEST_MALFORMED_URL_DESC ) , messageGetter . getMessage ( PingOozieHostTest . PING_OOZIE_HOST_TEST_MALFORMED_URL_MESSAGE , oozieUrl ) , java . net . MalformedURLException . class ) ; "<AssertPlaceHolder>" ; } getRuntimeTestResultEntries ( ) { return runtimeTestResultSummary . getRuntimeTestResultEntries ( ) ; }
org . junit . Assert . assertEquals ( 0 , runtimeTestResultSummary . getRuntimeTestResultEntries ( ) . size ( ) )
testCompatibilityWith_v1_0_11 ( ) { java . io . FileInputStream fis = new java . io . FileInputStream ( ( ( ch . qos . logback . classic . LoggerSerializationTest . SERIALIZATION_PREFIX ) + "logger_v1.0.11.ser" ) ) ; ch . qos . logback . core . net . HardenedObjectInputStream ois = new ch . qos . logback . classic . net . server . HardenedLoggingEventInputStream ( fis ) ; ch . qos . logback . classic . Logger a = ( ( ch . qos . logback . classic . Logger ) ( ois . readObject ( ) ) ) ; ois . close ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "a" , a . getName ( ) )
testGetChildNodesValuesText ( ) { wd . open ( org . finra . jtaf . ewd . widget . element . ElementTest . url ) ; org . finra . jtaf . ewd . widget . IElement e = new org . finra . jtaf . ewd . widget . element . Element ( "inner1" ) ; java . lang . String [ ] actual = e . getChildNodesValuesText ( ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "hello<sp>world" , "welcome" } ; "<AssertPlaceHolder>" ; } getChildNodesValuesText ( ) { org . openqa . selenium . WebElement we = new org . finra . jtaf . ewd . widget . element . Element ( getByLocator ( ) ) . getWebElement ( ) ; java . util . List < org . openqa . selenium . WebElement > childNodes = we . findElements ( org . openqa . selenium . By . xpath ( "./*" ) ) ; java . lang . String [ ] childText = new java . lang . String [ childNodes . size ( ) ] ; int i = 0 ; for ( org . openqa . selenium . WebElement element : childNodes ) { childText [ i ] = element . getText ( ) ; i ++ ; } return childText ; }
org . junit . Assert . assertArrayEquals ( expected , actual )
getComponentByName_success ( ) { net . sharkfw . system . L . setLogLevel ( L . LOGLEVEL_WARNING ) ; net . sharkfw . peer . J2SESharkEngine aliceEngine = new net . sharkfw . peer . J2SESharkEngine ( ) ; net . sharkfw . knowledgeBase . sync . manager . SyncManager aliceManager = aliceEngine . getSyncManager ( ) ; net . sharkfw . knowledgeBase . sync . PeerSemanticTag alice = net . sharkfw . knowledgeBase . inmemory . InMemoSharkKB . createInMemoPeerSemanticTag ( "alice" , "alice.de" , "tcp://localhost:7070" ) ; aliceEngine . setEngineOwnerPeer ( alice ) ; net . sharkfw . knowledgeBase . inmemory . InMemoSharkKB sharkKB = new net . sharkfw . knowledgeBase . inmemory . InMemoSharkKB ( ) ; net . sharkfw . knowledgeBase . sync . PeerSTSet peerSTSet = sharkKB . createInMemoPeerSTSet ( ) ; net . sharkfw . knowledgeBase . sync . SemanticTag kbName = sharkKB . createInMemoSemanticTag ( "kbName" , "kbsi.de" ) ; net . sharkfw . knowledgeBase . sync . SemanticTag kbName1 = sharkKB . createInMemoSemanticTag ( "kbName1" , "kbsi1.de" ) ; net . sharkfw . knowledgeBase . sync . SemanticTag kbName2 = sharkKB . createInMemoSemanticTag ( "kbName" 0 , "kbsi2.de" ) ; net . sharkfw . knowledgeBase . sync . SemanticTag kbName3 = sharkKB . createInMemoSemanticTag ( "kbName3" , "kbsi3.de" ) ; net . sharkfw . knowledgeBase . sync . manager . SyncComponent component = aliceManager . createSyncComponent ( sharkKB , kbName , peerSTSet , alice , true ) ; net . sharkfw . knowledgeBase . sync . manager . SyncComponent component1 = aliceManager . createSyncComponent ( sharkKB , kbName1 , peerSTSet , alice , true ) ; net . sharkfw . knowledgeBase . sync . manager . SyncComponent component2 = aliceManager . createSyncComponent ( sharkKB , kbName2 , peerSTSet , alice , true ) ; net . sharkfw . knowledgeBase . sync . manager . SyncComponent component3 = aliceManager . createSyncComponent ( sharkKB , kbName3 , peerSTSet , alice , true ) ; net . sharkfw . knowledgeBase . sync . manager . SyncComponent componentByName = aliceManager . getComponentByName ( kbName1 ) ; "<AssertPlaceHolder>" ; } getUniqueName ( ) { return uniqueName ; }
org . junit . Assert . assertTrue ( component1 . getUniqueName ( ) . getName ( ) . equals ( componentByName . getUniqueName ( ) . getName ( ) ) )
testSize ( ) { "<AssertPlaceHolder>" ; } size ( ) { final javax . swing . DefaultComboBoxModel < java . lang . String > model = ( ( javax . swing . DefaultComboBoxModel ) ( comboBox . getModel ( ) ) ) ; return model . getSize ( ) ; }
org . junit . Assert . assertEquals ( 6 , subject . size ( ) )
testMax ( ) { "<AssertPlaceHolder>" ; } max ( int , int ) { return a >= b ? a : b ; }
org . junit . Assert . assertEquals ( 20 , java . lang . Math . max ( 20 , 10 ) )
shouldUseDummyComputer ( ) { final int EXPECTED_RESULT = 42 ; com . octo . android . sample . ui . HelloAndroidActivity activityUnderTest = org . robolectric . Robolectric . buildActivity ( com . octo . android . sample . ui . HelloAndroidActivity . class ) . create ( ) . get ( ) ; android . widget . Button button = ( ( android . widget . Button ) ( activityUnderTest . findViewById ( R . id . button_main ) ) ) ; button . performClick ( ) ; android . widget . TextView textViewHello = ( ( android . widget . TextView ) ( activityUnderTest . findViewById ( R . id . textview_hello ) ) ) ; java . lang . String textViewHelloString = textViewHello . getText ( ) . toString ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( textViewHelloString , org . hamcrest . CoreMatchers . equalTo ( java . lang . String . valueOf ( EXPECTED_RESULT ) ) )
testGetResult ( ) { "<AssertPlaceHolder>" ; } getResult ( ) { com . sforce . soap . partner . GetDeletedResult result = new com . sforce . soap . partner . GetDeletedResult ( ) ; java . util . List < com . sforce . soap . partner . DeletedRecord > records = new java . util . ArrayList ( ) ; for ( int i = 1000 ; i < 1999 ; i ++ ) { com . sforce . soap . partner . DeletedRecord record = new com . sforce . soap . partner . DeletedRecord ( ) ; record . setId ( ( "0019000001fvZV" + i ) ) ; records . add ( record ) ; } result . setDeletedRecords ( records . toArray ( new com . sforce . soap . partner . DeletedRecord [ records . size ( ) ] ) ) ; return result ; }
org . junit . Assert . assertNotNull ( r . getResult ( ) )
testEncodeDecodeEmptyHeaders ( ) { java . util . Map < java . lang . String , java . lang . String > emptyHeaders = new java . util . HashMap ( ) ; io . netty . buffer . ByteBuf binaryHeaders = serializer . encodeHeaders ( emptyHeaders ) ; java . util . Map < java . lang . String , java . lang . String > decodedHeaders = serializer . decodeHeaders ( binaryHeaders ) ; "<AssertPlaceHolder>" ; binaryHeaders . release ( ) ; } decodeHeaders ( io . netty . buffer . ByteBuf ) { int numHeaders = buffer . readUnsignedShort ( ) ; java . util . Map < java . lang . String , java . lang . String > headers = com . google . common . collect . Maps . newHashMapWithExpectedSize ( numHeaders ) ; for ( int i = 0 ; i < numHeaders ; i ++ ) { java . lang . String key = com . uber . tchannel . codecs . CodecUtils . decodeString ( buffer ) ; java . lang . String value = com . uber . tchannel . codecs . CodecUtils . decodeString ( buffer ) ; headers . put ( key , value ) ; } return headers ; }
org . junit . Assert . assertEquals ( emptyHeaders , decodedHeaders )
isUserSubscribedExpectFalse ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 1 ) ; net . jforum . entities . User user = new net . jforum . entities . User ( ) ; user . setId ( 1 ) ; "<AssertPlaceHolder>" ; } getSubscription ( net . jforum . entities . Topic , net . jforum . entities . User ) { return this . repository . getSubscription ( topic , user ) ; }
org . junit . Assert . assertNull ( dao . getSubscription ( topic , user ) )
handle_internal_error_from_server ( ) { net . gjerull . etherpad . client . EPLiteConnection connection = new net . gjerull . etherpad . client . EPLiteConnection ( "http://example.com/" , "apikey" , net . gjerull . etherpad . client . EPLiteConnectionTest . API_VERSION , net . gjerull . etherpad . client . EPLiteConnectionTest . ENCODING ) ; java . lang . String serverResponse = java . lang . String . format ( net . gjerull . etherpad . client . EPLiteConnectionTest . RESPONSE_TEMPLATE , 2 , "an<sp>internal<sp>error<sp>has<sp>occurred" , null ) ; try { connection . handleResponse ( serverResponse ) ; org . junit . Assert . fail ( ( ( "Expected<sp>'" + ( net . gjerull . etherpad . client . EPLiteException . class . getName ( ) ) ) + "'<sp>to<sp>be<sp>thrown" ) ) ; } catch ( net . gjerull . etherpad . client . EPLiteException e ) { "<AssertPlaceHolder>" ; } } handleResponse ( java . lang . String ) { try { org . json . simple . parser . JSONParser parser = new org . json . simple . parser . JSONParser ( ) ; java . util . Map response = ( ( java . util . Map ) ( parser . parse ( jsonString ) ) ) ; if ( ( response . get ( "code" ) ) != null ) { int code = ( ( java . lang . Long ) ( response . get ( "code" ) ) ) . intValue ( ) ; switch ( code ) { case net . gjerull . etherpad . client . EPLiteConnection . CODE_OK : return response . get ( "data" ) ; case net . gjerull . etherpad . client . EPLiteConnection . CODE_INVALID_PARAMETERS : case net . gjerull . etherpad . client . EPLiteConnection . CODE_INTERNAL_ERROR : case net . gjerull . etherpad . client . EPLiteConnection . CODE_INVALID_METHOD : case net . gjerull . etherpad . client . EPLiteConnection . CODE_INVALID_API_KEY : throw new net . gjerull . etherpad . client . EPLiteException ( ( ( java . lang . String ) ( response . get ( "message" ) ) ) ) ; default : throw new net . gjerull . etherpad . client . EPLiteException ( ( "An<sp>unknown<sp>error<sp>has<sp>occurred<sp>while<sp>handling<sp>the<sp>response:<sp>" + jsonString ) ) ; } } else { throw new net . gjerull . etherpad . client . EPLiteException ( ( "An<sp>unexpected<sp>response<sp>from<sp>the<sp>server:<sp>" + jsonString ) ) ; } } catch ( org . json . simple . parser . ParseException e ) { throw new net . gjerull . etherpad . client . EPLiteException ( ( ( "Unable<sp>to<sp>parse<sp>JSON<sp>response<sp>(" + jsonString ) + ")" ) , e ) ; } }
org . junit . Assert . assertEquals ( "an<sp>internal<sp>error<sp>has<sp>occurred" , e . getMessage ( ) )
filter_with_predicate ( ) { java . util . List < com . levelup . java . util . stream . StreamFilterAndSlice . Post > postWithLessThan500 = posts . stream ( ) . filter ( ( p ) -> p . wordlength < 500 ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , postWithLessThan500 . size ( ) )
whenValidationWithValidReturnValue_thenZeroVoilations ( ) { org . baeldung . javaxval . methodvalidation . model . ReservationManagement object = new org . baeldung . javaxval . methodvalidation . model . ReservationManagement ( ) ; java . lang . reflect . Method method = org . baeldung . javaxval . methodvalidation . model . ReservationManagement . class . getMethod ( "getAllCustomers" ) ; java . lang . Object returnValue = java . util . Collections . singletonList ( new org . baeldung . javaxval . methodvalidation . model . Customer ( "William" , "Smith" ) ) ; java . util . Set < javax . validation . ConstraintViolation < org . baeldung . javaxval . methodvalidation . model . ReservationManagement > > violations = executableValidator . validateReturnValue ( object , method , returnValue ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , violations . size ( ) )
stringToByteArrayTest2 ( ) { for ( java . nio . charset . Charset charset : charsets ) { ch . bfh . unicrypt . helper . converter . classes . bytearray . StringToByteArray converter = ch . bfh . unicrypt . helper . converter . classes . bytearray . StringToByteArray . getInstance ( charset ) ; for ( java . lang . String s : strings ) { ch . bfh . unicrypt . helper . array . classes . ByteArray ba = converter . convert ( s ) ; "<AssertPlaceHolder>" ; if ( charset != ( java . nio . charset . StandardCharsets . UTF_8 ) ) { try { converter . reconvert ( ba . add ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { } } } } } reconvert ( W ) { if ( this . isValidOutput ( value ) ) { return this . abstractReconvert ( value ) ; } throw new java . lang . IllegalArgumentException ( ) ; }
org . junit . Assert . assertEquals ( s , converter . reconvert ( ba ) )
testIsAktenummerHetzelfdeAlsAktenummerInHeaderAnderNummer ( ) { final nl . bzk . migratiebrp . bericht . model . lo3 . impl . Tb02Bericht bericht = new nl . bzk . migratiebrp . bericht . model . lo3 . impl . Tb02Bericht ( ) ; final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > waarden = maakLijstSluiting ( ) ; java . lang . reflect . Method parseInhoud = bericht . getClass ( ) . getDeclaredMethod ( "parseInhoud" , java . util . List . class ) ; parseInhoud . setAccessible ( true ) ; parseInhoud . invoke ( bericht , waarden ) ; bericht . setHeader ( Lo3HeaderVeld . AKTENUMMER , "3QA6543" ) ; "<AssertPlaceHolder>" ; } isAktenummerHetzelfdeAlsAktenummerInHeader ( ) { boolean result = true ; for ( final nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde waarde : categorieen ) { if ( waarde . getElementen ( ) . containsKey ( Lo3ElementEnum . ELEMENT_8120 ) ) { result = result && ( waarde . getElement ( Lo3ElementEnum . ELEMENT_8120 ) . equals ( getHeader ( Lo3HeaderVeld . AKTENUMMER ) ) ) ; } } return result ; }
org . junit . Assert . assertFalse ( bericht . isAktenummerHetzelfdeAlsAktenummerInHeader ( ) )
testDifferentImaginaryChar ( ) { org . apache . commons . math3 . complex . Complex c = new org . apache . commons . math3 . complex . Complex ( 1 , 1 ) ; java . lang . String expected = "1<sp>+<sp>j" ; java . lang . String actual = complexFormatJ . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
one_$parent_nary_in_string_array_returns_true_when_field_value_matches_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field2.$parent.field6.nf1','op':'$in','values':['blah','yada','nvalue1']}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
testSort ( ) { fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations tool = new fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations ( ) ; java . util . LinkedList < fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature > rows = new java . util . LinkedList < fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature > ( ) ; rows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 210L , 600L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "1" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; rows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 300L , 350L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "2" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; rows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 100L , 200L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "2" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; rows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 100L , 200L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "1" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; java . util . LinkedList < fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature > sortedRows = new java . util . LinkedList < fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature > ( ) ; sortedRows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 100L , 200L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "1" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; sortedRows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 210L , 600L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "1" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; sortedRows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 100L , 200L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "2" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; sortedRows . add ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Feature ( new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Region ( 300L , 350L , new fi . csc . microarray . client . visualisation . methods . gbrowser . message . Chromosome ( "2" ) ) , fi . csc . microarray . client . visualisation . methods . gbrowser . util . RegionOperations . getEmptyExtraFieldMap ( ) ) ) ; tool . sort ( rows ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( rows , sortedRows )
exceptionInTask ( ) { jetbrains . jetpad . base . ThrowableHandlers . asInProduction ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . edt . Override public void run ( ) { manager . schedule ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . edt . Override public void run ( ) { throw new java . lang . RuntimeException ( ) ; } } ) ; } } ) ; final jetbrains . jetpad . base . Value < java . lang . Boolean > taskCompleted = new jetbrains . jetpad . base . Value ( false ) ; manager . schedule ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . edt . Override public void run ( ) { taskCompleted . set ( true ) ; } } ) ; "<AssertPlaceHolder>" ; } get ( ) { return java . util . Collections . unmodifiableList ( new java . util . ArrayList ( list ) ) ; }
org . junit . Assert . assertTrue ( taskCompleted . get ( ) )
shouldDeferAnAtomicInteger ( ) { java . util . concurrent . atomic . AtomicInteger a = new java . util . concurrent . atomic . AtomicInteger ( 1 ) ; com . oracle . bedrock . deferred . Deferred < java . lang . Integer > deferred = com . oracle . bedrock . deferred . DeferredHelper . deferred ( a ) ; "<AssertPlaceHolder>" ; } get ( ) { return "Hello" ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , deferred . get ( ) )
testGetEventType ( ) { com . iluwatar . eda . model . User user = new com . iluwatar . eda . model . User ( "iluwatar" ) ; com . iluwatar . eda . event . UserCreatedEvent userCreatedEvent = new com . iluwatar . eda . event . UserCreatedEvent ( user ) ; "<AssertPlaceHolder>" ; } getType ( ) { return java . util . Optional . ofNullable ( ( ( java . lang . String ) ( get ( com . iluwatar . abstractdocument . domain . HasType . PROPERTY ) ) ) ) ; }
org . junit . Assert . assertEquals ( com . iluwatar . eda . event . UserCreatedEvent . class , userCreatedEvent . getType ( ) )
returnNullFromMockedMethodReturningSubtypeOfUnmockableType ( mockit . CascadingParametersTest$AnotherClass ) { mockit . List < ? > l = mock . getList ( ) ; "<AssertPlaceHolder>" ; } getList ( ) { return null ; }
org . junit . Assert . assertNull ( l )
executeShouldExecuteAndReturnTrue ( ) { java . sql . Connection connection = java . sql . DriverManager . getConnection ( ( ( "jdbc:neo4j:" + ( org . neo4j . jdbc . bolt . BoltNeo4jStatementIT . neo4j . getBoltUrl ( ) ) ) + "?nossl" ) ) ; java . sql . Statement statement = connection . createStatement ( ) ; boolean result = statement . execute ( StatementData . STATEMENT_MATCH_ALL ) ; "<AssertPlaceHolder>" ; connection . close ( ) ; } execute ( java . lang . String ) { org . neo4j . driver . v1 . StatementResult result = executeInternal ( sql ) ; boolean hasResultSet = false ; if ( result != null ) { hasResultSet = hasResultSet ( sql ) ; if ( hasResultSet ) { this . currentResultSet = org . neo4j . jdbc . bolt . BoltNeo4jResultSet . newInstance ( this . hasDebug ( ) , this , result , this . resultSetParams ) ; this . currentUpdateCount = - 1 ; } else { this . currentResultSet = null ; try { org . neo4j . driver . v1 . summary . SummaryCounters stats = result . consume ( ) . counters ( ) ; this . currentUpdateCount = ( ( ( stats . nodesCreated ( ) ) + ( stats . nodesDeleted ( ) ) ) + ( stats . relationshipsCreated ( ) ) ) + ( stats . relationshipsDeleted ( ) ) ; } catch ( java . lang . Exception e ) { throw new java . sql . SQLException ( e ) ; } } } return hasResultSet ; }
org . junit . Assert . assertTrue ( result )
saveAppointment ( ) { org . apache . openmeetings . calendar . TestAppointmentAddAppointment . log . debug ( "-<sp>saveAppointment" ) ; java . util . Calendar start = java . util . Calendar . getInstance ( ) ; start . setTimeInMillis ( ( ( start . getTimeInMillis ( ) ) + 600000 ) ) ; java . util . Calendar end = java . util . Calendar . getInstance ( ) ; end . setTimeInMillis ( ( ( start . getTimeInMillis ( ) ) + 600000 ) ) ; java . lang . String appointmentName = "Test<sp>01" ; java . lang . String appointmentDescription = "Descr" ; java . lang . Long userId = 1L ; java . lang . String appointmentLocation = "lastname" 1 ; java . lang . Boolean isMonthly = false ; java . lang . Boolean isDaily = false ; java . lang . Boolean isWeekly = false ; java . lang . String remind = Appointment . Reminder . ical . name ( ) ; java . lang . Boolean isYearly = false ; java . lang . String [ ] mmClient = new java . lang . String [ 1 ] ; for ( int i = 0 ; i < 1 ; i ++ ) { mmClient [ 0 ] = org . apache . openmeetings . calendar . TestAppointmentAddAppointment . createClientObj ( ( "firstname" + i ) , ( "lastname" + i ) , ( ( ( ( "first" + i ) + ".last" ) + i ) + "@webbase-design.de" ) , "Etc/GMT+1" ) ; } java . lang . Long languageId = 1L ; java . lang . Long roomType = 1L ; org . apache . openmeetings . db . entity . calendar . Appointment a = new org . apache . openmeetings . db . entity . calendar . Appointment ( ) ; a . setTitle ( appointmentName ) ; a . setLocation ( appointmentLocation ) ; a . setDescription ( appointmentDescription ) ; a . setStart ( start . getTime ( ) ) ; a . setEnd ( end . getTime ( ) ) ; a . setIsDaily ( isDaily ) ; a . setIsWeekly ( isWeekly ) ; a . setIsMonthly ( isMonthly ) ; a . setIsYearly ( isYearly ) ; a . setReminder ( org . apache . openmeetings . db . entity . calendar . Appointment . Reminder . valueOf ( remind ) ) ; a . setRoom ( new org . apache . openmeetings . db . entity . room . Room ( ) ) ; a . getRoom ( ) . setComment ( appointmentDescription ) ; a . getRoom ( ) . setName ( appointmentName ) ; a . getRoom ( ) . setType ( Room . Type . get ( roomType ) ) ; a . getRoom ( ) . setAppointment ( true ) ; a . setOwner ( userDao . get ( userId ) ) ; a . setPasswordProtected ( false ) ; a . setPassword ( "" ) ; a . setMeetingMembers ( new java . util . ArrayList < org . apache . openmeetings . db . entity . calendar . MeetingMember > ( ) ) ; for ( java . lang . String singleClient : mmClient ) { if ( org . apache . wicket . util . string . Strings . isEmpty ( singleClient ) ) { continue ; } org . apache . openmeetings . db . entity . calendar . MeetingMember mm = getMeetingMember ( userId , languageId , singleClient ) ; mm . setAppointment ( a ) ; a . getMeetingMembers ( ) . add ( mm ) ; } a = appointmentDao . update ( a , userId ) ; java . lang . Thread . sleep ( 3000 ) ; appointmentLogic . doScheduledMeetingReminder ( ) ; java . lang . Thread . sleep ( 3000 ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( ( "lastname" 0 + ( a . getId ( ) ) ) , a . getId ( ) )
testFindById ( ) { org . apache . ambari . server . orm . entities . ResourceEntity entity = new org . apache . ambari . server . orm . entities . ResourceEntity ( ) ; expect ( entityManager . find ( org . apache . ambari . server . orm . entities . ResourceEntity . class , 99L ) ) . andReturn ( entity ) ; replay ( entityManager ) ; org . apache . ambari . server . orm . dao . ResourceDAO dao = new org . apache . ambari . server . orm . dao . ResourceDAO ( ) ; dao . entityManagerProvider = entityManagerProvider ; "<AssertPlaceHolder>" ; } findById ( java . lang . Long ) { return entityManagerProvider . get ( ) . find ( org . apache . ambari . server . orm . entities . TopologyHostRequestEntity . class , id ) ; }
org . junit . Assert . assertEquals ( entity , dao . findById ( 99L ) )
member_equals_trueForEqualObjects ( ) { com . restfb . json . JsonObject . Member member = new com . restfb . json . JsonObject . Member ( "a" , Json . TRUE ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object , java . lang . Object ) { if ( ( object1 == null ) && ( object2 == null ) ) { return true ; } if ( ! ( ( object1 != null ) && ( object2 != null ) ) ) { return false ; } if ( ! ( ( object1 . getClass ( ) . isInstance ( object2 ) ) || ( object2 . getClass ( ) . isInstance ( object1 ) ) ) ) { return false ; } com . restfb . util . Set < com . restfb . util . Method > accessorMethodsIntersection = new com . restfb . util . HashSet ( com . restfb . util . ReflectionUtils . getAccessors ( object1 . getClass ( ) ) ) ; accessorMethodsIntersection . retainAll ( com . restfb . util . ReflectionUtils . getAccessors ( object2 . getClass ( ) ) ) ; for ( com . restfb . util . Method method : accessorMethodsIntersection ) { try { if ( ! ( method . isAccessible ( ) ) ) { method . setAccessible ( true ) ; } java . lang . Object result1 = method . invoke ( object1 ) ; java . lang . Object result2 = method . invoke ( object2 ) ; if ( ( result1 == null ) && ( result2 == null ) ) { continue ; } if ( ! ( ( result1 != null ) && ( result2 != null ) ) ) { return false ; } if ( ! ( result1 . equals ( result2 ) ) ) { return false ; } } catch ( java . lang . Exception e ) { throw new java . lang . IllegalStateException ( ( "Unable<sp>to<sp>reflectively<sp>invoke<sp>" + method ) , e ) ; } } return true ; }
org . junit . Assert . assertTrue ( member . equals ( new com . restfb . json . JsonObject . Member ( "a" , Json . TRUE ) ) )
testDebugChemModel ( ) { org . openscience . cdk . interfaces . IChemModel chemModel = new org . openscience . cdk . debug . DebugChemModel ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( chemModel )
testDirectoryResourceFilter ( ) { org . aesh . io . filter . DirectoryResourceFilter directoryResourceFilter = new org . aesh . io . filter . DirectoryResourceFilter ( ) ; "<AssertPlaceHolder>" ; } accept ( java . util . zip . ZipEntry ) { if ( entry . isDirectory ( ) ) { return false ; } if ( ( entryNameFilter ) == null ) { return true ; } for ( final java . lang . String filter : entryNameFilter ) { if ( entry . getName ( ) . startsWith ( filter ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( directoryResourceFilter . accept ( resource ) )
testMissingAggregation ( ) { com . liferay . portal . search . aggregation . bucket . MissingAggregation missingAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . missing ( "name" , "field" ) ; "<AssertPlaceHolder>" ; } missing ( java . lang . String , java . lang . String ) { return new com . liferay . portal . search . internal . aggregation . bucket . MissingAggregationImpl ( name , field ) ; }
org . junit . Assert . assertNotNull ( missingAggregation )
testGetSupportedCipherSuites ( ) { javax . net . ssl . SSLSocketFactory factory = mock ( javax . net . ssl . SSLSocketFactory . class ) ; org . eclipse . kura . core . ssl . SSLSocketFactoryWrapper wrapper = new org . eclipse . kura . core . ssl . SSLSocketFactoryWrapper ( factory , "ciphers" , false ) ; java . lang . String [ ] sSupportedCipherSuites = new java . lang . String [ ] { "cipher1" , "cipher2" } ; when ( factory . getSupportedCipherSuites ( ) ) . thenReturn ( sSupportedCipherSuites ) ; "<AssertPlaceHolder>" ; } getSupportedCipherSuites ( ) { return this . sslsf . getSupportedCipherSuites ( ) ; }
org . junit . Assert . assertArrayEquals ( sSupportedCipherSuites , wrapper . getSupportedCipherSuites ( ) )
testMatrix ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1 , 2 , 3 , 4 } , new long [ ] { 2 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray brr = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 5 , 6 } , new long [ ] { 1 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray row = arr . getRow ( 0 ) ; row . subi ( brr ) ; "<AssertPlaceHolder>" ; } create ( int [ ] , float [ ] [ ] ) { int slices = arrays . length ; org . nd4j . linalg . factory . INDArray ret = org . nd4j . linalg . factory . Nd4j . create ( org . nd4j . linalg . util . ArrayUtil . combine ( new int [ ] { slices } , sliceShape ) ) ; for ( int i = 0 ; i < ( ret . slices ( ) ) ; i ++ ) ret . putSlice ( i , org . nd4j . linalg . factory . Nd4j . create ( arrays [ i ] ) . reshape ( org . nd4j . linalg . util . ArrayUtil . toLongArray ( sliceShape ) ) ) ; return ret ; }
org . junit . Assert . assertEquals ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { - 4 , - 4 } ) , arr . getRow ( 0 ) )
issuerIsCorrect ( ) { java . lang . String issuer = "CN=QuoVadis<sp>Global<sp>SSL<sp>ICA,<sp>OU=www.quovadisglobal.com,<sp>O=QuoVadis<sp>Limited,<sp>C=BM" ; "<AssertPlaceHolder>" ; } getIssuer ( ) { return certificate . getIssuerX500Principal ( ) . toString ( ) ; }
org . junit . Assert . assertEquals ( issuer , certificate . getIssuer ( ) )
testHLLMergeDisjoint ( ) { com . github . prasanthj . hll . HyperLogLog hll1 = com . github . prasanthj . hll . HyperLogLog . builder ( ) . setNumRegisterIndexBits ( 16 ) . build ( ) ; for ( int i = 0 ; i < ( size ) ; i ++ ) { hll1 . addLong ( i ) ; } com . github . prasanthj . hll . HyperLogLog hll2 = com . github . prasanthj . hll . HyperLogLog . builder ( ) . setNumRegisterIndexBits ( 16 ) . build ( ) ; for ( int i = size ; i < ( 2 * ( size ) ) ; i ++ ) { hll2 . addLong ( i ) ; } hll1 . merge ( hll2 ) ; double threshold = ( ( size ) > 40000 ) ? longRangeTolerance : shortRangeTolerance ; double delta = ( threshold * ( size ) ) / 100 ; long expected = 2 * ( size ) ; long actual = hll1 . count ( ) ; "<AssertPlaceHolder>" ; } count ( ) { if ( ( invalidateCount ) || ( ( cachedCount ) < 0 ) ) { if ( encoding . equals ( com . github . prasanthj . hll . HyperLogLog . EncodingType . SPARSE ) ) { int mPrime = 1 << ( sparseRegister . getPPrime ( ) ) ; cachedCount = linearCount ( mPrime , ( mPrime - ( sparseRegister . getSparseMap ( ) . size ( ) ) ) ) ; } else { double sum = denseRegister . getSumInversePow2 ( ) ; long numZeros = denseRegister . getNumZeroes ( ) ; cachedCount = ( ( long ) ( ( alphaMM ) * ( 1.0 / sum ) ) ) ; long pow = ( ( long ) ( java . lang . Math . pow ( 2 , chosenHashBits ) ) ) ; if ( noBias ) { cachedCount = ( ( cachedCount ) <= ( 5 * ( m ) ) ) ? ( cachedCount ) - ( estimateBias ( cachedCount ) ) : cachedCount ; long h = cachedCount ; if ( numZeros != 0 ) { h = linearCount ( m , numZeros ) ; } if ( h < ( getThreshold ( ) ) ) { cachedCount = h ; } } else { if ( ( cachedCount ) <= ( 2.5 * ( m ) ) ) { if ( numZeros != 0 ) { cachedCount = linearCount ( m , numZeros ) ; } } else if ( ( ( chosenHashBits ) < 64 ) && ( ( cachedCount ) > ( 0.033333 * pow ) ) ) { if ( ( cachedCount ) > ( ( 1 / 30 ) * pow ) ) { cachedCount = ( ( long ) ( ( - pow ) * ( java . lang . Math . log ( ( 1.0 - ( ( ( double ) ( cachedCount ) ) / ( ( double ) ( pow ) ) ) ) ) ) ) ) ; } } } } invalidateCount = false ; } return cachedCount ; }
org . junit . Assert . assertEquals ( expected , actual , delta )
toAvroParquetFileTarget ( ) { org . apache . avro . generic . GenericRecord savedRecord = new org . apache . avro . generic . GenericData . Record ( org . apache . crunch . test . Person . SCHEMA$ ) ; savedRecord . put ( "name" , "John<sp>Doe" ) ; savedRecord . put ( "age" , 42 ) ; savedRecord . put ( "siblingnames" , com . google . common . collect . Lists . newArrayList ( "Jimmy" , "Jane" ) ) ; populateGenericFile ( com . google . common . collect . Lists . newArrayList ( savedRecord ) , Person . SCHEMA . ) ; org . apache . crunch . Pipeline pipeline = new org . apache . crunch . impl . spark . SparkPipeline ( "local" , "avroparq" ) ; org . apache . crunch . PCollection < org . apache . crunch . test . Person > genericCollection = pipeline . read ( org . apache . crunch . io . At . avroFile ( avroFile . getAbsolutePath ( ) , org . apache . crunch . types . avro . Avros . records ( org . apache . crunch . test . Person . class ) ) ) ; java . io . File outputFile = tmpDir . getFile ( "output" ) ; org . apache . crunch . Target parquetFileTarget = new org . apache . crunch . io . parquet . AvroParquetFileTarget ( outputFile . getAbsolutePath ( ) ) ; pipeline . write ( genericCollection , parquetFileTarget ) ; pipeline . run ( ) ; org . apache . crunch . test . Person person = genericCollection . materialize ( ) . iterator ( ) . next ( ) ; org . apache . hadoop . fs . Path parquetFile = new org . apache . hadoop . fs . Path ( new java . io . File ( outputFile , "part-r-00000.parquet" ) . getPath ( ) ) ; org . apache . parquet . avro . AvroParquetReader < org . apache . crunch . test . Person > reader = new org . apache . parquet . avro . AvroParquetReader < org . apache . crunch . test . Person > ( parquetFile ) ; try { org . apache . crunch . test . Person readPerson = reader . read ( ) ; "<AssertPlaceHolder>" ; } finally { reader . close ( ) ; pipeline . done ( ) ; } } getPath ( ) { return path ; }
org . junit . Assert . assertThat ( readPerson , org . hamcrest . core . Is . is ( person ) )
deveObterTipoEventoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno ( ) ; final java . lang . String tipoEvento = "150" ; eventoRetorno . setTipoEvento ( tipoEvento ) ; "<AssertPlaceHolder>" ; } getTipoEvento ( ) { return this . tipoEvento ; }
org . junit . Assert . assertEquals ( tipoEvento , eventoRetorno . getTipoEvento ( ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . roster . model . Roster > rosters = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { int kbArticlesCount = com . liferay . knowledgebase . service . KBArticleServiceUtil . getKBArticlesCount ( getGroupId ( ) , getKbFolderId ( ) , WorkflowConstants . STATUS_ANY ) ; if ( kbArticlesCount > 0 ) { return false ; } int kbFoldersCount = com . liferay . knowledgebase . service . KBFolderServiceUtil . getKBFoldersCount ( getGroupId ( ) , getKbFolderId ( ) ) ; if ( kbFoldersCount > 0 ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( rosters . isEmpty ( ) )
testChunkedEncodingMessage ( ) { startTestServer ( ( request ) -> request . getBody ( ) . map ( ( body ) -> io . datakernel . http . HttpResponse . ok200 ( ) . withBody ( body ) ) ) ; java . lang . String crlf = new java . lang . String ( CRLF , UTF_8 ) ; java . lang . String chunkedRequest = ( ( ( ( ( ( ( ( ( ( ( ( "POST<sp>/<sp>HTTP/1.1" + crlf ) + "Host:<sp>localhost" ) + crlf ) + "Transfer-Encoding:<sp>chunked" ) + crlf ) + crlf ) + "4" ) + crlf ) + "Test" ) + crlf ) + "0" ) + crlf ) + crlf ; java . lang . String responseMessage = ( ( ( ( ( ( "HTTP/1.1<sp>200<sp>OK" + crlf ) + "Content-Length:<sp>4" ) + crlf ) + "Connection:<sp>keep-alive" ) + crlf ) + crlf ) + "Test" ; io . datakernel . bytebuf . ByteBuf body = await ( io . datakernel . eventloop . AsyncTcpSocketImpl . connect ( new java . net . InetSocketAddress ( io . datakernel . http . HttpStreamTest . PORT ) ) . then ( ( socket ) -> socket . write ( io . datakernel . bytebuf . ByteBuf . wrapForReading ( chunkedRequest . getBytes ( io . datakernel . http . UTF_8 ) ) ) . then ( ( $ ) -> socket . read ( ) ) . whenComplete ( ( $ , e ) -> socket . close ( ) ) ) ) ; "<AssertPlaceHolder>" ; deepRecycle ( expectedList ) ; } asString ( java . nio . charset . Charset ) { java . lang . String string = getString ( charset ) ; recycle ( ) ; return string ; }
org . junit . Assert . assertEquals ( responseMessage , body . asString ( io . datakernel . http . UTF_8 ) )
testNext ( ) { double lat = 37.7 ; double lon = - 122.52 ; ch . hsr . geohash . GeoHash hash = ch . hsr . geohash . GeoHash . withBitPrecision ( lat , lon , 10 ) ; ch . hsr . geohash . GeoHash next = hash . next ( ) ; "<AssertPlaceHolder>" ; } compareTo ( ch . hsr . geohash . GeoHash ) { int bitsCmp = java . lang . Long . compare ( ( ( bits ) ^ ( ch . hsr . geohash . GeoHash . FIRST_BIT_FLAGGED ) ) , ( ( o . bits ) ^ ( ch . hsr . geohash . GeoHash . FIRST_BIT_FLAGGED ) ) ) ; if ( bitsCmp != 0 ) { return bitsCmp ; } else { return java . lang . Integer . compare ( significantBits , o . significantBits ) ; } }
org . junit . Assert . assertTrue ( ( ( hash . compareTo ( next ) ) < 0 ) )
getPatientIdentifierTypeByName_shouldReturnNullWhenPatientIdentifierTypeWithGivenNameDoesNotExist ( ) { org . openmrs . PatientIdentifierType identifierType = org . openmrs . api . context . Context . getPatientService ( ) . getPatientIdentifierTypeByName ( "Invalid<sp>Identifier<sp>Example" ) ; "<AssertPlaceHolder>" ; } getPatientIdentifierTypeByName ( java . lang . String ) { java . util . List < org . openmrs . PatientIdentifierType > types = getPatientIdentifierTypes ( name , null , null , null ) ; if ( ! ( types . isEmpty ( ) ) ) { return types . get ( 0 ) ; } return null ; }
org . junit . Assert . assertNull ( identifierType )
stateMachineTraits020Test ( ) { java . lang . String code = "class<sp>A<sp>{isA<sp>T1<sp><status.activate1()<sp>as<sp>enable>;}<sp>trait<sp>T1<sp>{<sp>status<sp>{<sp>on<sp>{<sp>activate<sp>-><sp>on;}}<sp>}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "231" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
org . junit . Assert . assertTrue ( result )
getSslSession ( ) { "<AssertPlaceHolder>" ; } getSslSession ( ) { return sslChannel . getSslSession ( ) ; }
org . junit . Assert . assertNotNull ( sslChannel . getSslSession ( ) )
testByteArrayOrder3 ( ) { lombok . val original = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 25 , 25 ) . reshape ( 'f' , 5 , 5 ) ; lombok . val bufferBuilder = new com . google . flatbuffers . FlatBufferBuilder ( 0 ) ; int array = original . toFlatArray ( bufferBuilder ) ; bufferBuilder . finish ( array ) ; lombok . val flatArray = org . nd4j . graph . FlatArray . getRootAsFlatArray ( bufferBuilder . dataBuffer ( ) ) ; lombok . val restored = org . nd4j . linalg . factory . Nd4j . createFromFlatArray ( flatArray ) ; "<AssertPlaceHolder>" ; } createFromFlatArray ( org . nd4j . graph . FlatArray ) { lombok . val dtype = array . dtype ( ) ; lombok . val order = array . byteOrder ( ) ; lombok . val rank = ( ( int ) ( array . shape ( 0 ) ) ) ; lombok . val shape = new long [ ( rank * 2 ) + 4 ] ; for ( int e = 0 ; e < ( shape . length ) ; e ++ ) shape [ e ] = array . shape ( e ) ; char ordering = ( ( shape [ ( ( shape . length ) - 1 ) ] ) == 99 ) ? 'c' : 'f' ; lombok . val shapeOf = org . nd4j . linalg . api . shape . Shape . shapeOf ( shape ) ; lombok . val stridesOf = org . nd4j . linalg . api . shape . Shape . stridesOf ( shape ) ; lombok . val _dtype = org . nd4j . autodiff . samediff . SameDiff . getDataTypeFromByte ( dtype ) ; lombok . val _order = org . nd4j . autodiff . samediff . SameDiff . getOrderFromByte ( order ) ; lombok . val prod = ( rank > 0 ) ? org . nd4j . linalg . util . ArrayUtil . prod ( shapeOf ) : 1 ; lombok . val doubles = new double [ prod ] ; lombok . val bb = array . bufferAsByteBuffer ( ) ; switch ( _dtype ) { case DOUBLE : { lombok . val db = bb . order ( _order ) . asDoubleBuffer ( ) ; for ( int e = 0 ; e < prod ; e ++ ) doubles [ e ] = db . get ( e ) ; } break ; case FLOAT : { lombok . val fb = bb . order ( _order ) . asFloatBuffer ( ) ; for ( int e = 0 ; e < prod ; e ++ ) doubles [ e ] = ( ( double ) ( fb . get ( e ) ) ) ; } break ; case HALF : { lombok . val sb = bb . order ( _order ) . asShortBuffer ( ) ; for ( int e = 0 ; e < prod ; e ++ ) doubles [ e ] = ( ( double ) ( org . bytedeco . javacpp . indexer . HalfIndexer . toFloat ( ( ( int ) ( sb . get ( e ) ) ) ) ) ) ; } break ; default : throw new java . lang . UnsupportedOperationException ( ( ( "Unknown<sp>datatype:<sp>[" + _dtype ) + "]" ) ) ; } return org . nd4j . linalg . factory . Nd4j . create ( doubles , shapeOf , stridesOf , 0 , ordering ) ; }
org . junit . Assert . assertEquals ( original , restored )
testHasErrorsWhenBothWarningsAndErrorsAreRecorded ( ) { "<AssertPlaceHolder>" ; } hasErrors ( ) { runCodes ( ) ; return ( numErrors ) > 0 ; }
org . junit . Assert . assertThat ( report . hasErrors ( ) , org . hamcrest . Matchers . equalTo ( true ) )
testInValidProperty1 ( ) { expectedException . expect ( org . apache . servicecomb . foundation . metrics . meter . IllegalStateException . class ) ; expectedException . expectMessage ( "invalid<sp>latency<sp>scope,<sp>min=2,<sp>max=1." ) ; org . apache . servicecomb . foundation . metrics . meter . LatencyDistributionConfig latencyDistributionConfig = new org . apache . servicecomb . foundation . metrics . meter . LatencyDistributionConfig ( "2,1,10" ) ; "<AssertPlaceHolder>" ; } getScopeConfigs ( ) { return scopeConfigs ; }
org . junit . Assert . assertEquals ( 0 , latencyDistributionConfig . getScopeConfigs ( ) . size ( ) )
testFindAllVisible ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . data . page . Page < ? extends com . gentics . mesh . core . data . Project > page = meshRoot ( ) . getProjectRoot ( ) . findAll ( mockActionContext ( ) , new com . gentics . mesh . parameter . impl . PagingParametersImpl ( 1 , 25L ) ) ; "<AssertPlaceHolder>" ; } } findAll ( com . gentics . mesh . core . data . MeshAuthUser , java . util . List , com . gentics . mesh . parameter . PagingParameters ) { com . syncleus . ferma . traversals . VertexTraversal < ? , ? , ? > traversal = user . getPermTraversal ( com . gentics . mesh . core . data . root . impl . READ_PERM ) ; return new com . gentics . mesh . core . data . page . impl . DynamicTransformablePageImpl < com . gentics . mesh . core . data . node . Node > ( user , traversal , pagingInfo , READ_PERM , com . gentics . mesh . core . data . node . impl . NodeImpl . class ) ; }
org . junit . Assert . assertNotNull ( page )
stringToEnum_convertableString_valueIsConverted ( ) { com . vaadin . flow . server . communication . rpc . EnumDecoderTest . Title title = com . vaadin . flow . server . communication . rpc . EnumDecoderTest . Title . MRS ; com . vaadin . flow . server . communication . rpc . EnumDecoderTest . Title decoded = decoder . decode ( elemental . json . Json . create ( title . name ( ) ) , com . vaadin . flow . server . communication . rpc . EnumDecoderTest . Title . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { return com . vaadin . flow . internal . ReflectTools . createInstance ( type ) ; }
org . junit . Assert . assertEquals ( title , decoded )
shouldNotExtendIfMaxReplicaCountIsReached ( ) { when ( regionExecPlan . getRegionType ( ) ) . thenReturn ( cs . bilkent . joker . engine . adaptation . impl . bottleneckresolver . PARTITIONED_STATEFUL ) ; when ( regionExecPlan . getReplicaCount ( ) ) . thenReturn ( cs . bilkent . joker . engine . adaptation . impl . bottleneckresolver . RegionExtenderTest . MAX_REPLICA_COUNT ) ; final cs . bilkent . joker . engine . adaptation . AdaptationAction action = regionExtender . resolve ( regionExecPlan , bottleneckPipelineMetrics ) ; "<AssertPlaceHolder>" ; } resolve ( cs . bilkent . joker . engine . flow . RegionExecPlan , java . util . List ) { cs . bilkent . joker . engine . flow . RegionExecPlan currentExecPlan = execPlan ; final java . util . List < cs . bilkent . joker . operator . utils . Pair < cs . bilkent . joker . engine . adaptation . AdaptationAction , java . util . List < cs . bilkent . joker . engine . flow . PipelineId > > > actions = new java . util . ArrayList ( ) ; for ( cs . bilkent . joker . engine . metric . PipelineMetrics pipelineMetrics : metrics ) { final cs . bilkent . joker . engine . adaptation . AdaptationAction action = resolve ( currentExecPlan , pipelineMetrics ) ; if ( action == null ) { return emptyList ( ) ; } actions . add ( cs . bilkent . joker . operator . utils . Pair . of ( action , singletonList ( pipelineMetrics . getPipelineId ( ) ) ) ) ; currentExecPlan = action . getNewExecPlan ( ) ; } cs . bilkent . joker . engine . adaptation . impl . bottleneckresolver . PipelineSplitter . LOGGER . info ( "Region:<sp>{}<sp>bottlenecks<sp>can<sp>be<sp>resolved<sp>with<sp>splits:<sp>{}" , execPlan . getRegionId ( ) , actions ) ; return actions ; }
org . junit . Assert . assertNull ( action )
testStats ( ) { stubFor ( any ( urlMatching ( ".*" ) ) . willReturn ( aResponse ( ) . withStatus ( HttpURLConnection . HTTP_OK ) . withHeader ( "Content-Type" , "application/json" ) . withBody ( com . suse . salt . netapi . client . SaltClientTest . JSON_STATS_RESPONSE ) ) ) ; com . suse . salt . netapi . datatypes . cherrypy . Stats stats = client . stats ( ) . toCompletableFuture ( ) . join ( ) ; "<AssertPlaceHolder>" ; verify ( 1 , getRequestedFor ( urlEqualTo ( "/stats" ) ) . withHeader ( "Accept" , equalTo ( "application/json" ) ) . withRequestBody ( equalTo ( "" ) ) ) ; } stats ( ) { return asyncHttpClient . get ( uri . resolve ( "stats" ) , JsonParser . STATS ) ; }
org . junit . Assert . assertNotNull ( stats )
testGetQueriesWithFunction ( ) { com . salesforce . dva . argus . service . MetricService metricService = system . getServiceFactory ( ) . getMetricService ( ) ; java . util . List < com . salesforce . dva . argus . service . tsdb . MetricQuery > queries = metricService . getQueries ( "SUM(1000:2000:scope:metric{tagk=tagv}:avg:15m-avg,<sp>1000:2000:scope:metric{tagk=tagv}:avg:15m-avg)" ) ; "<AssertPlaceHolder>" ; } getQueries ( java . util . List ) { requireNotDisposed ( ) ; return getQueries ( expressions , java . lang . System . currentTimeMillis ( ) ) ; }
org . junit . Assert . assertEquals ( 2 , queries . size ( ) )
testContentTypeEvaluatorOnlyTypeNoMatch ( ) { ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "**************************<sp>START:<sp>testContentTypeEvaluator_OnlyType_NoMatch()<sp>***********************" ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate predicate = new ddf . catalog . pubsub . predicate . ContentTypePredicate ( "nitf" , null ) ; java . lang . String inputContentType = "video,v20" ; ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ctec = new ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ( predicate , inputContentType ) ; boolean status = ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . evaluate ( ctec ) ; "<AssertPlaceHolder>" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( "**************************<sp>END:<sp>testContentTypeEvaluator_OnlyType_NoMatch()<sp>***********************" ) ; } evaluate ( ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ) { java . lang . String methodName = "evaluate" ; ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "\\*" 0 , methodName ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate matchContentTypePredicate = ctec . getContentType ( ) ; java . lang . String matchType = matchContentTypePredicate . getType ( ) ; java . lang . String matchVersion = matchContentTypePredicate . getVersion ( ) ; if ( matchType != null ) { matchType = matchType . replaceAll ( "\\*" , ".*" ) ; } if ( matchVersion != null ) { matchVersion = matchVersion . replaceAll ( "\\*" , ".*" ) ; } java . lang . String input = ctec . getInputContentType ( ) ; ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "\\*" 1 , matchContentTypePredicate ) ; java . lang . String inputType ; java . lang . String inputVersion ; if ( ( input == null ) || ( input . matches ( "," ) ) ) { inputType = "null" ; inputVersion = "null" ; } else { java . lang . String [ ] inputTypeVersionPair = input . split ( "," ) ; if ( inputTypeVersionPair [ 0 ] . isEmpty ( ) ) { inputType = "null" ; } else { inputType = inputTypeVersionPair [ 0 ] ; } if ( ( inputTypeVersionPair . length ) == 1 ) { inputVersion = "null" ; } else { inputVersion = inputTypeVersionPair [ 1 ] ; } } ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "inputType<sp>=<sp>{},<sp>inputVersion<sp>=<sp>{}" , inputType , inputVersion ) ; ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "matchType<sp>=<sp>{},<sp>matchVersion<sp>=<sp>{}" , matchType , matchVersion ) ; if ( ( ( matchType != null ) && ( ! ( matchType . isEmpty ( ) ) ) ) && ( inputType . matches ( matchType ) ) ) { if ( ( ( matchVersion != null ) && ( ! ( matchVersion . isEmpty ( ) ) ) ) && ( ! ( inputVersion . matches ( matchVersion ) ) ) ) { ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "EXITING:<sp>{}<sp>-<sp>returning<sp>false.<sp>Did<sp>not<sp>match<sp>version." , methodName ) ; return false ; } ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "EXITING:<sp>{}<sp>-<sp>returning<sp>true." , methodName ) ; return true ; } ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . LOGGER . debug ( "EXITING:<sp>{}<sp>-<sp>returning<sp>false." , methodName ) ; return false ; }
org . junit . Assert . assertFalse ( status )
testRunInsertFail ( ) { this . expectedKriptonRuntimeExceptionWithCause ( android . database . sqlite . SQLiteConstraintException . class ) ; sqlite . kripton93 . BindBean93DataSource dataSource = sqlite . kripton93 . BindBean93DataSource . getInstance ( ) ; final sqlite . kripton93 . Bean93 bean = new sqlite . kripton93 . Bean93 ( ) ; bean . name = "all" ; dataSource . execute ( new sqlite . kripton93 . BindBean93DataSource . Transaction ( ) { @ sqlite . kripton93 . Override public com . abubusoft . kripton . android . sqlite . TransactionResult onExecute ( sqlite . kripton93 . BindBean93DaoFactory daoFactory ) { sqlite . kripton93 . Bean93DaoImpl dao = daoFactory . getBean93Dao ( ) ; dao . insertDefault ( bean ) ; dao . insertFail ( bean ) ; "<AssertPlaceHolder>" ; return com . abubusoft . kripton . android . sqlite . TransactionResult . ROLLBACK ; } } ) ; } selectAll ( ) { final com . abubusoft . kripton . android . livedata . KriptonLiveDataHandlerImpl < java . util . List < sqlite . feature . livedata . data . Person > > builder = new com . abubusoft . kripton . android . livedata . KriptonLiveDataHandlerImpl < java . util . List < sqlite . feature . livedata . data . Person > > ( ) { @ sqlite . feature . livedata . persistence3 . dao . Override protected java . util . List < sqlite . feature . livedata . data . Person > compute ( ) { return sqlite . feature . livedata . persistence3 . repository . BindAppDataSource . getInstance ( ) . executeBatch ( new sqlite . feature . livedata . persistence3 . repository . BindAppDataSource . Batch < java . util . List < sqlite . feature . livedata . data . Person > > ( ) { @ java . lang . Override public List < sqlite . feature . livedata . data . Person > onExecute ( sqlite . feature . livedata . persistence3 . repository . BindAppDaoFactory daoFactory ) { return daoFactory . getDaoPerson ( ) . selectAllForLiveData ( ) ; } } ) ; } } ; registryLiveData ( builder ) ; return builder . getLiveData ( ) ; }
org . junit . Assert . assertTrue ( ( ( dao . selectAll ( ) . size ( ) ) == 1 ) )
shouldReturnFalseForDifferentUser ( ) { org . togglz . core . user . FeatureUser user = new org . togglz . core . user . SimpleFeatureUser ( "john" , false ) ; org . togglz . core . repository . FeatureState state = new org . togglz . core . repository . FeatureState ( org . togglz . core . activation . UsernameActivationStrategyTest . MyFeature . FEATURE ) . enable ( ) . setStrategyId ( UsernameActivationStrategy . ID ) . setParameter ( UsernameActivationStrategy . PARAM_USERS , "person1,ck,person2" ) ; boolean active = strategy . isActive ( state , user ) ; "<AssertPlaceHolder>" ; } isActive ( org . togglz . core . repository . FeatureState , org . togglz . core . user . FeatureUser ) { return true ; }
org . junit . Assert . assertEquals ( false , active )
testTextExtent_withMarkup ( ) { org . eclipse . swt . graphics . Point textExtend = org . eclipse . rap . rwt . internal . textsize . TextSizeUtil . textExtent ( getFont ( ) , "<b>foo</b>" , 0 , false ) ; org . eclipse . swt . graphics . Point markupExtend = org . eclipse . rap . rwt . internal . textsize . TextSizeUtil . textExtent ( getFont ( ) , "<b>foo</b>" , 0 , true ) ; "<AssertPlaceHolder>" ; } getFont ( ) { return new org . eclipse . swt . graphics . Font ( display , org . eclipse . rap . rwt . internal . textsize . TextSizeUtil_Test . FONT_DATA ) ; }
org . junit . Assert . assertTrue ( ( ( textExtend . x ) > ( markupExtend . x ) ) )
testGetLAMBDA ( ) { java . lang . String actual = table . getLAMBDA ( ) ; java . lang . String expected = "lambda" ; "<AssertPlaceHolder>" ; } getLAMBDA ( ) { return "lambda" ; }
org . junit . Assert . assertEquals ( expected , actual )
tesBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . GeboorteVerzoekBerichtTest . class . getResourceAsStream ( "geboorteVerzoekBerichtSyntaxExceptionBericht.xml" ) ) ; final nl . moderniseringgba . isc . esb . message . brp . BrpBericht brpBericht = factory . getBericht ( berichtOrigineel ) ; "<AssertPlaceHolder>" ; } getBericht ( java . lang . String ) { try { final javax . xml . bind . JAXBElement < ? > element = NotificatieXml . SINGLETON . stringToElement ( berichtAlsString ) ; return maakBericht ( element . getValue ( ) ) ; } catch ( final javax . xml . bind . JAXBException e ) { nl . bzk . migratiebrp . bericht . model . notificatie . factory . NotificatieBerichtFactory . LOG . warn ( "Verwerken<sp>bericht<sp>mislukt" , e ) ; return new nl . bzk . migratiebrp . bericht . model . notificatie . impl . OngeldigBericht ( berichtAlsString , e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) )
whenIsPowOfLong_shouldReturnFalseeIfNotPowerOfTwo ( ) { boolean result = com . google . common . math . LongMath . isPowerOfTwo ( 20L ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( result )
testPhysicalFileSet ( ) { final org . oscm . build . ant . Files . IFileSet set = new org . oscm . build . ant . Files . PhysicalFileSet ( new java . io . File ( "resources/files" ) , "**/*.txt" ) ; final java . util . Set < java . lang . String > actual = new java . util . HashSet < java . lang . String > ( ) ; for ( final org . oscm . build . ant . Files . IFile f : set . getFiles ( ) ) { actual . add ( f . getLocalPath ( ) ) ; } final java . util . Set < java . lang . String > expected = new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( new java . lang . String [ ] { "a.txt" , "dir/c.txt" } ) ) ; "<AssertPlaceHolder>" ; } getLocalPath ( ) { return localpath ; }
org . junit . Assert . assertEquals ( expected , actual )
testSubtractHour1 ( ) { java . lang . String str1 = "2015-02-23<sp>18:54:00" ; java . lang . String str2 = "2015-02-23<sp>21:55:22" ; int rs = com . opslab . util . DateUtil . subtractHour ( sdf . parse ( str1 ) , sdf . parse ( str2 ) ) ; "<AssertPlaceHolder>" ; } subtractHour ( java . util . Date , java . util . Date ) { long cha = ( ( date2 . getTime ( ) ) - ( date1 . getTime ( ) ) ) / 1000 ; return ( ( int ) ( cha ) ) / ( 60 * 60 ) ; }
org . junit . Assert . assertEquals ( "" , 3 , rs )
testImportNewFileWithNoManifestMimeNotRegistred ( ) { org . pentaho . platform . plugin . services . importer . RepositoryFileImportFileHandlerTest . ImportTestBuilder importTesterBuilder = new org . pentaho . platform . plugin . services . importer . RepositoryFileImportFileHandlerTest . ImportTestBuilder ( ) ; importTesterBuilder . targetName ( org . pentaho . platform . plugin . services . importer . RepositoryFileImportFileHandlerTest . TARGET_RESOURCE_NAME_ERREXT ) . build ( ) . initialSetup ( ) . execute ( ) ; org . pentaho . platform . api . repository2 . unified . RepositoryFile repositoryFile = mockRepository . getFile ( ( ( ( org . pentaho . platform . plugin . services . importer . RepositoryFileImportFileHandlerTest . PATH ) + "/" ) + ( org . pentaho . platform . plugin . services . importer . RepositoryFileImportFileHandlerTest . TARGET_RESOURCE_NAME ) ) ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { java . io . File f = new java . io . File ( getAbsolutePath ( path ) ) ; if ( ! ( f . exists ( ) ) ) { error ( org . pentaho . platform . engine . core . messages . Messages . getInstance ( ) . getErrorString ( "SYSTEMSETTINGS.ERROR_0002_FILE_NOT_IN_SOLUTION" , f . getAbsolutePath ( ) ) ) ; return null ; } debug ( org . pentaho . platform . engine . core . messages . Messages . getInstance ( ) . getString ( "SYSTEMSETTINGS.DEBUG_SYSTEM_SETTINGS_GET_FILE" , f . getAbsolutePath ( ) ) ) ; return f ; }
org . junit . Assert . assertNull ( repositoryFile )
test_recursive_union ( ) { org . jacorb . test . orb . RecursiveUnion testValue = new org . jacorb . test . orb . RecursiveUnion ( ) ; org . jacorb . test . orb . RecursiveUnion b = new org . jacorb . test . orb . RecursiveUnion ( ) ; b . b ( new org . jacorb . test . orb . RecursiveUnion [ 0 ] ) ; testValue . b ( new org . jacorb . test . orb . RecursiveUnion [ ] { b , b } ) ; org . omg . CORBA . Any outAny = setup . getClientOrb ( ) . create_any ( ) ; org . jacorb . test . orb . RecursiveUnionHelper . insert ( outAny , testValue ) ; org . omg . CORBA . Any inAny = server . bounce_any ( outAny ) ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
org . junit . Assert . assertTrue ( outAny . equal ( inAny ) )
testLogicalOrLowAnd6 ( ) { org . openscience . cdk . smiles . smarts . SMARTSQueryTool sqt = org . openscience . cdk . smiles . smarts . parser . SMARTSSearchTest . smarts ( "[#7,C;+0,+1]" ) ; org . openscience . cdk . interfaces . IAtomContainer smi = org . openscience . cdk . smiles . smarts . parser . SMARTSSearchTest . smiles ( "[Na+].[Na+].[O-]C(=O)c1ccccc1c2c3ccc([O-])cc3oc4cc(=O)ccc24" ) ; int [ ] results = org . openscience . cdk . smiles . smarts . parser . SMARTSSearchTest . match ( sqt , smi ) ; "<AssertPlaceHolder>" ; } match ( org . openscience . cdk . smiles . smarts . SMARTSQueryTool , org . openscience . cdk . interfaces . IAtomContainer ) { boolean status = sqt . matches ( m ) ; if ( status ) { return new int [ ] { sqt . countMatches ( ) , sqt . getUniqueMatchingAtoms ( ) . size ( ) } ; } else { return new int [ ] { 0 , 0 } ; } }
org . junit . Assert . assertEquals ( 1 , results [ 0 ] )
stringsAreEqual ( ) { java . lang . String a = new java . lang . String ( new char [ ] { '1' , '2' , '3' } ) ; java . lang . String b = new java . lang . String ( new char [ ] { '1' , '2' , '3' } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( a , b )
testOnScriptDoesNotModifyTheScript ( ) { java . lang . String originalScript = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ; java . lang . String newScript = _amJournalTransformerListener . onScript ( originalScript , _document , com . liferay . adaptive . media . journal . web . internal . transformer . AMJournalTransformerListenerTest . _LANGUAGE_ID , _tokens ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verifyZeroInteractions ( _document ) ; } onScript ( java . lang . String , com . liferay . portal . kernel . xml . Document , java . lang . String , java . util . Map ) { if ( com . liferay . journal . properties . transformer . listener . internal . JournalPropertiesTransformerListener . _log . isDebugEnabled ( ) ) { com . liferay . journal . properties . transformer . listener . internal . JournalPropertiesTransformerListener . _log . debug ( "onScript" ) ; } return replace ( script , languageId , tokens ) ; }
org . junit . Assert . assertSame ( originalScript , newScript )
testCycle ( ) { int [ ] [ ] g = new int [ ] [ ] { new int [ ] { 1 , 5 } , new int [ ] { 0 , 2 } , new int [ ] { 1 , 3 } , new int [ ] { 2 , 4 } , new int [ ] { 3 , 5 } , new int [ ] { 4 , 0 } } ; int [ ] path = org . openscience . cdk . graph . GraphUtil . cycle ( g , new int [ ] { 0 , 3 , 4 , 1 , 5 , 2 } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( path , org . hamcrest . CoreMatchers . is ( new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 0 } ) )
shouldNotRemoveTagCode ( ) { java . lang . String html = "<code>My<sp>inline<sp>code<sp>maroto</code>" ; java . lang . String sanitized = htmlSanitizer . sanitize ( html ) . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; }
org . junit . Assert . assertEquals ( html , sanitized )
testOverload2 ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( ) ; java . lang . String i = "insert<sp>data<sp>{<sp>" + ( ( "function<sp>us:value(?a)<sp>{" 4 + "us:t2<sp>us:length<sp>'1000<sp>m'^^us:length<sp>." ) + "function<sp>us:value(?a)<sp>{" 0 ) ; java . lang . String q = "@event<sp>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "function<sp>us:value(?a)<sp>{" 3 + "function<sp>us:value(?a)<sp>{" 3 ) + "function<sp>us:value(?a)<sp>{" 2 ) + "function<sp>us:value(?a)<sp>{" 0 ) + "function<sp>us:value(?a)<sp>{" 0 ) + "function<sp>us:eq(?a,<sp>?b)<sp>{" ) + "us:convert(?a)<sp>=<sp>us:convert(?b)" ) + "function<sp>us:value(?a)<sp>{" 0 ) + "function<sp>us:value(?a)<sp>{" 1 ) + "if<sp>(contains(?a,<sp>'km'),<sp>1000<sp>*<sp>us:value(?a),<sp>us:value(?a))" ) + "function<sp>us:value(?a)<sp>{" 0 ) + "function<sp>us:convertw(?a)<sp>{" ) + "if<sp>(contains(?a,<sp>'kg'),<sp>1000<sp>*<sp>us:value(?a),<sp>us:value(?a))" ) + "function<sp>us:value(?a)<sp>{" 0 ) + "function<sp>us:value(?a)<sp>{" ) + "xsd:integer(strbefore(?a,<sp>'<sp>'))" ) + "function<sp>us:value(?a)<sp>{" 0 ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; exec . query ( i ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return tests . size ( ) ; }
org . junit . Assert . assertEquals ( 5 , map . size ( ) )
testSerializationStackedBarChart ( ) { com . orsoncharts . Chart3D c1 = com . orsoncharts . Chart3DFactory . createStackedBarChart ( "title" , "subtitle" , createCategoryDataset ( ) , "rowAxis" , "columnAxis" , "valueAxis" ) ; com . orsoncharts . Chart3D c2 = ( ( com . orsoncharts . Chart3D ) ( com . orsoncharts . TestUtils . serialized ( c1 ) ) ) ; "<AssertPlaceHolder>" ; } serialized ( java . io . Serializable ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( c1 , c2 )
prepareProductStatusRestriction ( ) { java . lang . String actual = ps . prepareProductStatusRestriction ( ) ; "<AssertPlaceHolder>" ; } prepareProductStatusRestriction ( ) { java . lang . String actual = ps . prepareProductStatusRestriction ( ) ; org . junit . Assert . assertEquals ( org . oscm . serviceprovisioningservice . bean . ProductSearchTest . RESTRICTION_SUSPENDED_OR_ACTIVE , actual ) ; }
org . junit . Assert . assertEquals ( org . oscm . serviceprovisioningservice . bean . ProductSearchTest . RESTRICTION_SUSPENDED_OR_ACTIVE , actual )
shouldReadHttpRequestOnSocketInputStreamToStringLowerCaseHeaders ( ) { java . net . Socket socket = mock ( java . net . Socket . class ) ; when ( socket . getInputStream ( ) ) . thenReturn ( org . apache . commons . io . IOUtils . toInputStream ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "cache-control:public,<sp>max-age=60" ) + ( NEW_LINE ) ) + "content-length:10" ) + ( NEW_LINE ) ) + "content-type:text/html;<sp>charset=utf-8" ) + ( NEW_LINE ) ) + "date:Sat,<sp>04<sp>Jan<sp>2014<sp>17:18:54<sp>GMT" ) + ( NEW_LINE ) ) + "expires:Sat,<sp>04<sp>Jan<sp>2014<sp>17:19:54<sp>GMT" ) + ( NEW_LINE ) ) + "last-modified:Sat,<sp>04<sp>Jan<sp>2014<sp>17:18:54<sp>GMT" ) + ( NEW_LINE ) ) + "vary:*" ) + ( NEW_LINE ) ) + ( NEW_LINE ) ) + "1234567890" ) , java . nio . charset . StandardCharsets . UTF_8 ) ) ; java . lang . String result = org . mockserver . streams . IOStreamUtils . readInputStreamToString ( socket ) ; "<AssertPlaceHolder>" ; } readInputStreamToString ( java . net . Socket ) { java . io . BufferedReader bufferedReader = new java . io . BufferedReader ( new java . io . InputStreamReader ( socket . getInputStream ( ) ) ) ; java . lang . StringBuilder result = new java . lang . StringBuilder ( ) ; java . lang . String line ; java . lang . Integer contentLength = null ; while ( ( line = bufferedReader . readLine ( ) ) != null ) { if ( ( line . startsWith ( "content-length" ) ) || ( line . startsWith ( "Content-Length" ) ) ) { contentLength = java . lang . Integer . parseInt ( line . split ( ":" ) [ 1 ] . trim ( ) ) ; } if ( ( line . length ( ) ) == 0 ) { if ( contentLength != null ) { result . append ( org . mockserver . streams . NEW_LINE ) ; for ( int position = 0 ; position < contentLength ; position ++ ) { result . append ( ( ( char ) ( bufferedReader . read ( ) ) ) ) ; } } break ; } result . append ( line ) . append ( org . mockserver . streams . NEW_LINE ) ; } return result . toString ( ) ; }
org . junit . Assert . assertEquals ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "cache-control:public,<sp>max-age=60" ) + ( NEW_LINE ) ) + "content-length:10" ) + ( NEW_LINE ) ) + "content-type:text/html;<sp>charset=utf-8" ) + ( NEW_LINE ) ) + "date:Sat,<sp>04<sp>Jan<sp>2014<sp>17:18:54<sp>GMT" ) + ( NEW_LINE ) ) + "expires:Sat,<sp>04<sp>Jan<sp>2014<sp>17:19:54<sp>GMT" ) + ( NEW_LINE ) ) + "last-modified:Sat,<sp>04<sp>Jan<sp>2014<sp>17:18:54<sp>GMT" ) + ( NEW_LINE ) ) + "vary:*" ) + ( NEW_LINE ) ) + ( NEW_LINE ) ) + "1234567890" ) , result )
testGetworkflowByIdNoDataSource ( ) { org . apache . oodt . cas . workflow . repository . DataSourceWorkflowRepository repo = new org . apache . oodt . cas . workflow . repository . DataSourceWorkflowRepository ( null ) ; org . apache . oodt . cas . workflow . structs . Workflow w = repo . getWorkflowById ( "1" ) ; "<AssertPlaceHolder>" ; } getWorkflowById ( java . lang . String ) { org . apache . commons . lang . Validate . notNull ( workflowId ) ; return workflows . get ( workflowId ) ; }
org . junit . Assert . assertNull ( w )
shouldEchoBinaryFrameWithPayloadLength128 ( ) { org . kaazing . netx . URLConnectionHelper helper = org . kaazing . netx . URLConnectionHelper . newInstance ( ) ; java . net . URI location = java . net . URI . create ( "ws://localhost:8080/path" ) ; org . kaazing . netx . ws . WsURLConnection connection = ( ( org . kaazing . netx . ws . WsURLConnection ) ( helper . openConnection ( location ) ) ) ; java . io . OutputStream out = connection . getOutputStream ( ) ; java . io . InputStream in = connection . getInputStream ( ) ; byte [ ] writeBytes = new byte [ 128 ] ; random . nextBytes ( writeBytes ) ; out . write ( writeBytes ) ; byte [ ] readBytes = new byte [ 128 ] ; int offset = 0 ; int length = readBytes . length ; int bytesRead = 0 ; while ( ( bytesRead != ( - 1 ) ) && ( length > 0 ) ) { bytesRead = in . read ( readBytes , offset , length ) ; if ( bytesRead != ( - 1 ) ) { offset += bytesRead ; length -= bytesRead ; } } k3po . finish ( ) ; "<AssertPlaceHolder>" ; } read ( byte [ ] , int , int ) { return input . read ( b , off , len ) ; }
org . junit . Assert . assertArrayEquals ( writeBytes , readBytes )
testSessionClosedOnRemotingConnectionFailure ( ) { java . util . List < org . apache . activemq . artemis . api . core . TransportConfiguration > connectorConfigs = new java . util . ArrayList ( ) ; connectorConfigs . add ( new org . apache . activemq . artemis . api . core . TransportConfiguration ( INVM_CONNECTOR_FACTORY ) ) ; jmsServer . createConnectionFactory ( "cffoo" , false , JMSFactoryType . CF , registerConnectors ( server , connectorConfigs ) , null , ActiveMQClient . DEFAULT_CLIENT_FAILURE_CHECK_PERIOD , ActiveMQClient . DEFAULT_CONNECTION_TTL , ActiveMQClient . DEFAULT_CALL_TIMEOUT , ActiveMQClient . DEFAULT_CALL_FAILOVER_TIMEOUT , ActiveMQClient . DEFAULT_CACHE_LARGE_MESSAGE_CLIENT , ActiveMQClient . DEFAULT_MIN_LARGE_MESSAGE_SIZE , ActiveMQClient . DEFAULT_COMPRESS_LARGE_MESSAGES , ActiveMQClient . DEFAULT_CONSUMER_WINDOW_SIZE , ActiveMQClient . DEFAULT_CONSUMER_MAX_RATE , ActiveMQClient . DEFAULT_CONFIRMATION_WINDOW_SIZE , ActiveMQClient . DEFAULT_PRODUCER_WINDOW_SIZE , ActiveMQClient . DEFAULT_PRODUCER_MAX_RATE , ActiveMQClient . DEFAULT_BLOCK_ON_ACKNOWLEDGE , ActiveMQClient . DEFAULT_BLOCK_ON_DURABLE_SEND , ActiveMQClient . DEFAULT_BLOCK_ON_NON_DURABLE_SEND , ActiveMQClient . DEFAULT_AUTO_GROUP , ActiveMQClient . DEFAULT_PRE_ACKNOWLEDGE , ActiveMQClient . DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME , ActiveMQClient . DEFAULT_ACK_BATCH_SIZE , ActiveMQClient . DEFAULT_ACK_BATCH_SIZE , ActiveMQClient . DEFAULT_USE_GLOBAL_POOLS , ActiveMQClient . DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE , ActiveMQClient . DEFAULT_THREAD_POOL_MAX_SIZE , ActiveMQClient . DEFAULT_RETRY_INTERVAL , ActiveMQClient . DEFAULT_RETRY_INTERVAL_MULTIPLIER , ActiveMQClient . DEFAULT_MAX_RETRY_INTERVAL , 0 , ActiveMQClient . DEFAULT_FAILOVER_ON_INITIAL_CONNECTION , null , "/cffoo" ) ; cf = ( ( javax . jms . ConnectionFactory ) ( namingContext . lookup ( "/cffoo" ) ) ) ; javax . jms . Connection conn = cf . createConnection ( ) ; javax . jms . Queue queue = createQueue ( "testQueue" ) ; try { javax . jms . Session session = conn . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; javax . jms . MessageProducer prod = session . createProducer ( queue ) ; javax . jms . MessageConsumer cons = session . createConsumer ( queue ) ; conn . start ( ) ; prod . send ( session . createMessage ( ) ) ; "<AssertPlaceHolder>" ; org . apache . activemq . artemis . spi . core . protocol . RemotingConnection connection = ( ( org . apache . activemq . artemis . core . client . impl . ClientSessionInternal ) ( ( ( org . apache . activemq . artemis . jms . client . ActiveMQSession ) ( session ) ) . getCoreSession ( ) ) ) . getConnection ( ) ; connection . fail ( new org . apache . activemq . artemis . api . core . ActiveMQNotConnectedException ( ) ) ; try { prod . send ( session . createMessage ( ) ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>exception" ) ; } catch ( javax . jms . JMSException e ) { } try { cons . receive ( ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>exception" ) ; } catch ( javax . jms . JMSException e ) { } session . close ( ) ; conn . close ( ) ; } finally { try { conn . close ( ) ; } catch ( java . lang . Throwable igonred ) { } } } receive ( ) { session . lock ( ) ; try { if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( "receive<sp>" + ( this ) ) ) ; } checkState ( ) ; javax . jms . Message message = consumer . receive ( ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "received<sp>" + ( this ) ) + "<sp>result=" ) + message ) ) ; } if ( message == null ) { return null ; } else { return wrapMessage ( message ) ; } } finally { session . unlock ( ) ; } }
org . junit . Assert . assertNotNull ( cons . receive ( ) )
testGetSettingsPanel ( ) { System . out . println ( "getSettingsPanel" ) ; kg . apc . jmeter . graphs . AbstractGraphPanelVisualizer instance = new kg . apc . jmeter . graphs . AbstractGraphPanelVisualizerTest . AbstractGraphPanelVisualizerImpl ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
whenRouteStateIsSetWithGenericMethodAndInteger_itMustBeSetCorrectly ( ) { jsprit . core . problem . solution . route . VehicleRoute route = getRoute ( mock ( jsprit . core . problem . vehicle . Vehicle . class ) ) ; jsprit . core . algorithm . state . StateManager stateManager = new jsprit . core . algorithm . state . StateManager ( vrpMock ) ; jsprit . core . algorithm . state . StateId id = stateManager . createStateId ( "myState" ) ; int load = 3 ; stateManager . putRouteState ( route , id , load ) ; int getLoad = stateManager . getRouteState ( route , id , jsprit . core . algorithm . state . Integer . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 3 , getLoad )
testStartProcessInstanceByProcessDefinitionId ( ) { java . lang . String processDefinitionId = "processDefinitionId" ; java . util . Map < java . lang . String , java . lang . Object > variables = new java . util . HashMap ( ) ; org . activiti . engine . runtime . ProcessInstance expectedProcessInstance = mock ( org . activiti . engine . runtime . ProcessInstance . class ) ; when ( configurationHelper . getProperty ( ConfigurationValue . HERD_ENVIRONMENT ) ) . thenReturn ( "DEV" ) ; when ( activitiRuntimeService . startProcessInstanceById ( processDefinitionId , variables ) ) . thenReturn ( expectedProcessInstance ) ; org . activiti . engine . runtime . ProcessInstance actualProcessInstance = activitiService . startProcessInstanceByProcessDefinitionId ( processDefinitionId , variables ) ; "<AssertPlaceHolder>" ; verify ( activitiRuntimeService ) . startProcessInstanceById ( processDefinitionId , variables ) ; verifyNoMoreInteractions ( activitiRuntimeService ) ; } startProcessInstanceByProcessDefinitionId ( java . lang . String , java . util . Map ) { java . lang . String workflowEnvironment = configurationHelper . getProperty ( ConfigurationValue . HERD_ENVIRONMENT ) ; variables . put ( org . finra . herd . service . impl . ActivitiServiceImpl . HERD_WORKFLOW_ENVIRONMENT , workflowEnvironment ) ; return activitiRuntimeService . startProcessInstanceById ( processDefinitionId , variables ) ; }
org . junit . Assert . assertSame ( expectedProcessInstance , actualProcessInstance )
testValidateAesCtr_WithValidMessage_ExpectsSuccess ( ) { java . lang . String encryption = new org . osc . core . broker . util . crypto . EncryptionUtil ( ) . encryptAESCTR ( this . unEncryptedMessage ) ; "<AssertPlaceHolder>" ; } validateAESCTR ( java . lang . String , java . lang . String ) { return new org . osc . core . broker . util . crypto . AESCTREncryption ( ) . validate ( plainText , validCipherText ) ; }
org . junit . Assert . assertTrue ( new org . osc . core . broker . util . crypto . EncryptionUtil ( ) . validateAESCTR ( this . unEncryptedMessage , encryption ) )
testResolveFromParentByType ( ) { com . picocontainer . MutablePicoContainer parent = new com . picocontainer . DefaultPicoContainer ( ) ; parent . addComponent ( com . picocontainer . testmodel . Touchable . class , com . picocontainer . testmodel . SimpleTouchable . class ) ; com . picocontainer . MutablePicoContainer child = new com . picocontainer . DefaultPicoContainer ( parent ) ; child . addComponent ( com . picocontainer . testmodel . DependsOnTouchable . class ) ; "<AssertPlaceHolder>" ; } getComponent ( com . googlecode . jtype . Generic ) { return null ; }
org . junit . Assert . assertNotNull ( child . getComponent ( com . picocontainer . testmodel . DependsOnTouchable . class ) )
testFetchLimit ( ) { if ( ! ( accessStackAdapter . supportsStoredProcedures ( ) ) ) { return ; } createArtist ( 1000.0 ) ; createArtist ( 2000.0 ) ; createArtist ( 3000.0 ) ; org . apache . cayenne . query . ProcedureQuery q = new org . apache . cayenne . query . ProcedureQuery ( org . apache . cayenne . access . DataContextProcedureQueryIT . SELECT_STORED_PROCEDURE ) ; q . addParameter ( "aName" , "An<sp>Artist" ) ; q . addParameter ( "paintingPrice" , new java . lang . Integer ( 3000 ) ) ; q . setFetchLimit ( 2 ) ; java . util . List < ? > artists = runProcedureSelect ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , artists . size ( ) )
testStrict ( ) { org . apache . drill . test . LogFixture . LogFixtureBuilder logBuilder = org . apache . drill . test . LogFixture . builder ( ) . logger ( org . apache . drill . exec . memory . Accountant . class , Level . WARN ) ; try ( org . apache . drill . test . LogFixture logFixture = logBuilder . build ( ) ) { "<AssertPlaceHolder>" ; org . apache . drill . exec . memory . BufferAllocator allocator = fixture . allocator ( ) . newChildAllocator ( "test" , ( 10 * 1024 ) , ( 128 * 1024 ) ) ; io . netty . buffer . DrillBuf buf1 = allocator . buffer ( ( 64 * 1024 ) ) ; try { allocator . buffer ( ( 128 * 1024 ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . drill . exec . exception . OutOfMemoryException e ) { } buf1 . close ( ) ; allocator . close ( ) ; } } isAssertionsEnabled ( ) { return org . apache . drill . exec . util . AssertionUtil . ASSERT_ENABLED ; }
org . junit . Assert . assertTrue ( org . apache . drill . exec . util . AssertionUtil . isAssertionsEnabled ( ) )
appliesTransformer ( ) { org . mule . runtime . core . api . transformer . Transformer transformer1 = new org . mule . runtime . core . internal . transformer . builder . MockTransformerBuilder ( ) . from ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeB ) . to ( org . mule . runtime . core . api . config . TransformationServiceTestCase . dataTypeC ) . returning ( new org . mule . runtime . core . api . config . TransformationServiceTestCase . C ( ) ) . build ( ) ; org . mule . runtime . api . message . Message message = of ( new org . mule . runtime . core . api . config . TransformationServiceTestCase . B ( ) ) ; message = transformationService . applyTransformers ( message , null , transformer1 ) ; "<AssertPlaceHolder>" ; verifyTransformerExecuted ( transformer1 ) ; } getPayload ( ) { return payload ; }
org . junit . Assert . assertTrue ( ( ( message . getPayload ( ) . getValue ( ) ) instanceof org . mule . runtime . core . api . config . TransformationServiceTestCase . C ) )
testSelectFilesToDelete ( ) { final org . apache . logging . log4j . core . config . Configuration config = new org . apache . logging . log4j . core . config . DefaultConfiguration ( ) ; config . initialize ( ) ; final org . apache . logging . log4j . core . script . Script script = new org . apache . logging . log4j . core . script . Script ( "test" , "javascript" , "pathList;" ) ; final org . apache . logging . log4j . core . appender . rolling . action . ScriptCondition condition = new org . apache . logging . log4j . core . appender . rolling . action . ScriptCondition ( script , config ) ; final java . util . List < org . apache . logging . log4j . core . appender . rolling . action . PathWithAttributes > pathList = new java . util . ArrayList ( ) ; final java . nio . file . Path base = java . nio . file . Paths . get ( "baseDirectory" ) ; final java . util . List < org . apache . logging . log4j . core . appender . rolling . action . PathWithAttributes > result = condition . selectFilesToDelete ( base , pathList ) ; "<AssertPlaceHolder>" ; } selectFilesToDelete ( java . nio . file . Path , java . util . List ) { final javax . script . SimpleBindings bindings = new javax . script . SimpleBindings ( ) ; bindings . put ( "basePath" , basePath ) ; bindings . put ( "pathList" , candidates ) ; bindings . putAll ( configuration . getProperties ( ) ) ; bindings . put ( "configuration" , configuration ) ; bindings . put ( "substitutor" , configuration . getStrSubstitutor ( ) ) ; bindings . put ( "statusLogger" , org . apache . logging . log4j . core . appender . rolling . action . ScriptCondition . LOGGER ) ; final java . lang . Object object = configuration . getScriptManager ( ) . execute ( script . getName ( ) , bindings ) ; return ( ( java . util . List < org . apache . logging . log4j . core . appender . rolling . action . PathWithAttributes > ) ( object ) ) ; }
org . junit . Assert . assertSame ( result , pathList )
testCreateRootSuppliersOnly ( ) { final org . opendaylight . openflowplugin . applications . notification . supplier . tools . NotificationProviderConfig config = createNonConfigSupplier ( ) ; final org . opendaylight . openflowplugin . applications . notification . supplier . NotificationProvider provider = new org . opendaylight . openflowplugin . applications . notification . supplier . NotificationProvider ( notificationProviderService , dataBroker , config . isFlowSupport ( ) , config . isMeterSupport ( ) , config . isGroupSupport ( ) , config . isNodeConnectorStatSupport ( ) , config . isFlowStatSupport ( ) , config . isFlowTableStatSupport ( ) , config . isMeterStatSupport ( ) , config . isGroupStatSupport ( ) , config . isQueueStatSupport ( ) ) ; provider . start ( ) ; final java . util . List < org . opendaylight . openflowplugin . applications . notification . supplier . NotificationSupplierDefinition < ? > > listSuppliers = provider . getSupplierList ( ) ; int nrOfSuppliers = 0 ; for ( final org . opendaylight . openflowplugin . applications . notification . supplier . NotificationSupplierDefinition < ? > supplier : listSuppliers ) { if ( supplier != null ) { nrOfSuppliers ++ ; } } "<AssertPlaceHolder>" ; } getSupplierList ( ) { return supplierList ; }
org . junit . Assert . assertEquals ( 2 , nrOfSuppliers )
testCalendarRoundTrip ( ) { java . util . Calendar cal = org . nuxeo . ecm . platform . relations . api . impl . RelationDate . getCalendar ( literal ) ; org . nuxeo . ecm . platform . relations . api . Literal newLit = org . nuxeo . ecm . platform . relations . api . impl . RelationDate . getLiteralDate ( cal ) ; "<AssertPlaceHolder>" ; } getLiteralDate ( java . util . Date ) { return new org . nuxeo . ecm . platform . relations . api . impl . LiteralImpl ( org . nuxeo . ecm . platform . relations . api . impl . RelationDate . getDateFormat ( ) . format ( date ) ) ; }
org . junit . Assert . assertEquals ( newLit , literal )
testReadStageAll ( ) { org . opencb . opencga . storage . mongodb . variant . load . stage . MongoDBVariantStageReader reader = new org . opencb . opencga . storage . mongodb . variant . load . stage . MongoDBVariantStageReader ( collection , 1 , java . util . Collections . emptyList ( ) ) ; java . util . List < org . bson . Document > read = readAll ( reader ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( read . size ( ) , 6 )
testCreateBlobFail ( ) { java . lang . String blobName = "test-create-blob-fail" ; com . google . cloud . storage . BlobInfo blob = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . it . ITStorageTest . BUCKET , blobName ) . build ( ) ; com . google . cloud . storage . Blob remoteBlob = com . google . cloud . storage . it . ITStorageTest . storage . create ( blob ) ; "<AssertPlaceHolder>" ; com . google . cloud . storage . BlobInfo wrongGenerationBlob = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . it . ITStorageTest . BUCKET , blobName , ( - 1L ) ) . build ( ) ; try { com . google . cloud . storage . it . ITStorageTest . storage . create ( wrongGenerationBlob , com . google . cloud . storage . it . ITStorageTest . BLOB_BYTE_CONTENT , Storage . BlobTargetOption . generationMatch ( ) ) ; org . junit . Assert . fail ( "StorageException<sp>was<sp>expected" ) ; } catch ( com . google . cloud . storage . StorageException ex ) { } } create ( com . google . cloud . storage . Acl ) { return new com . google . cloud . storage . contrib . nio . AutoValue_OptionAcl ( acl ) ; }
org . junit . Assert . assertNotNull ( remoteBlob )