input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldDetectFailureInBeforeClassMethod ( ) { org . infinitest . testrunner . TestResults results = runner . runTest ( org . infinitest . testrunner . exampletests . junit4 . JUnit4FailingTestWithBeforeClass . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return module . getName ( ) ; } | org . junit . Assert . assertFalse ( isEmpty ( results ) ) |
testX ( ) { org . eclipse . e4 . core . contexts . IEclipseContext appContext = org . eclipse . e4 . core . contexts . EclipseContextFactory . create ( ) ; org . eclipse . e4 . core . contexts . IEclipseContext windowContext = appContext . createChild ( ) ; org . eclipse . e4 . core . contexts . IEclipseContext partContextA = windowContext . createChild ( ) ; org . eclipse . e4 . core . contexts . IEclipseContext partContextB = windowContext . createChild ( ) ; partContextA . activateBranch ( ) ; org . eclipse . e4 . core . internal . tests . contexts . inject . Bug317183Test . RunAndTrackImpl impl = new org . eclipse . e4 . core . internal . tests . contexts . inject . Bug317183Test . RunAndTrackImpl ( ) ; windowContext . runAndTrack ( impl ) ; impl . called = false ; partContextA . dispose ( ) ; partContextB . activate ( ) ; "<AssertPlaceHolder>" ; } activate ( ) { org . eclipse . e4 . core . internal . contexts . EclipseContext parent = getParent ( ) ; if ( parent == null ) return ; if ( ( this ) == ( parent . getActiveChild ( ) ) ) return ; parent . set ( org . eclipse . e4 . core . internal . contexts . EclipseContext . ACTIVE_CHILD , this ) ; if ( ( org . eclipse . e4 . core . internal . contexts . EclipseContext . debugAddOn ) != null ) { org . eclipse . e4 . core . internal . contexts . EclipseContext . debugAddOn . notify ( this , IEclipseContextDebugger . EventType . ACTIVATED , null ) ; } } | org . junit . Assert . assertTrue ( impl . called ) |
testPositiveInfinity ( ) { org . hipparchus . linear . RealMatrix m = org . hipparchus . linear . MatrixUtils . createRealMatrix ( new double [ ] [ ] { new double [ ] { Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY , Double . POSITIVE_INFINITY } } ) ; java . lang . String expected = "{{(Infinity),(Infinity),(Infinity)}}" ; java . lang . String actual = realMatrixFormat . format ( m ) ; "<AssertPlaceHolder>" ; } format ( org . hipparchus . geometry . Vector ) { return format ( vector , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
stateMachineTraits051Test ( ) { cruise . umple . compiler . UmpleModel model = getModelByFilename ( "trait_test_data_0009.ump" ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "236" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "entry" 4 ) ; } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } } | org . junit . Assert . assertTrue ( result ) |
activePartShouldBeReturned ( ) { presenter . setActivePart ( partPresenter1 ) ; "<AssertPlaceHolder>" ; } getActivePart ( ) { return activePart ; } | org . junit . Assert . assertEquals ( presenter . getActivePart ( ) , partPresenter1 ) |
testLimitWithUnnamedParam ( ) { com . orientechnologies . orient . core . sql . List < com . orientechnologies . orient . core . record . impl . ODocument > qResult = com . orientechnologies . orient . core . sql . OCommandExecutorSQLSelectTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "select<sp>from<sp>foo<sp>limit<sp>?" ) ) . execute ( 3 ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; } | org . junit . Assert . assertEquals ( qResult . size ( ) , 3 ) |
getInstance ( ) { "<AssertPlaceHolder>" ; } getInstance ( ) { org . junit . Assert . assertNotNull ( liquibase . database . DatabaseFactory . getInstance ( ) ) ; } | org . junit . Assert . assertNotNull ( liquibase . database . DatabaseFactory . getInstance ( ) ) |
shouldParseValue ( ) { de . slackspace . openkeepass . domain . CompressionAlgorithm compressionAlgorithm = de . slackspace . openkeepass . domain . CompressionAlgorithm . parseValue ( 1 ) ; "<AssertPlaceHolder>" ; } parseValue ( int ) { switch ( value ) { case 0 : return de . slackspace . openkeepass . domain . CompressionAlgorithm . None ; case 1 : return de . slackspace . openkeepass . domain . CompressionAlgorithm . Gzip ; default : throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Value<sp>%d<sp>is<sp>not<sp>a<sp>valid<sp>CompressionAlgorithm" , value ) ) ; } } | org . junit . Assert . assertEquals ( CompressionAlgorithm . Gzip , compressionAlgorithm ) |
testLockEntity ( ) { handler . addRequest ( false , "POST" , "/qcbin/rest/domains/domain/projects/project/defects/86/lock" , 200 ) . content ( "entityServiceTest_entity.xml" ) ; com . hp . alm . ali . idea . model . Entity defect = new com . hp . alm . ali . idea . model . Entity ( "defect" , 86 ) ; com . hp . alm . ali . idea . model . Entity entity = entityService . lockEntity ( defect , false ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( 86 , entity . getId ( ) ) |
testAddCustomAnnotationsWithNullConnection ( ) { java . lang . String logLine = org . apache . phoenix . util . LogUtil . addCustomAnnotations ( "log<sp>line" , ( ( org . apache . phoenix . jdbc . PhoenixConnection ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } addCustomAnnotations ( java . lang . String , org . apache . phoenix . jdbc . PhoenixConnection ) { if ( ( ( con == null ) || ( ( con . getCustomTracingAnnotations ( ) ) == null ) ) || ( con . getCustomTracingAnnotations ( ) . isEmpty ( ) ) ) { return logLine ; } else { return ( ( org . apache . phoenix . util . LogUtil . customAnnotationsToString ( con ) ) + '<sp>' ) + logLine ; } } | org . junit . Assert . assertEquals ( logLine , "log<sp>line" ) |
testCreateGeneralStatusSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . cdt . GeneralStatusSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . cdt . builder . CDTBuilderFactory . createGeneralStatusSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . cdt . GeneralStatusSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; } | org . junit . Assert . assertNotNull ( section ) |
apstka_vrdu_enerana ( ) { lv . semti . morphology . Testi . List < lv . semti . morphology . Testi . Wordform > formas = lv . semti . morphology . Testi . MorphologyTest . loctjs . generateInflections ( "labi" ) ; "<AssertPlaceHolder>" ; } size ( ) { return attributes . entrySet ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , formas . size ( ) ) |
shouldReturnNothingWhenNoMeasurementsExist ( ) { final int expectedValue = 2302 ; final int hours = 2 ; final long startTime = ( java . lang . System . currentTimeMillis ( ) ) - ( TimeUnit . HOURS . toMillis ( hours ) ) ; final java . util . List < java . lang . Object > group = java . util . Collections . emptyList ( ) ; org . apache . metron . profiler . ProfileMeasurement m = new org . apache . metron . profiler . ProfileMeasurement ( ) . withProfileName ( "profile1" ) . withEntity ( "entity1" ) . withPeriod ( startTime , org . apache . metron . profiler . client . stellar . VerboseProfileTest . periodDuration , org . apache . metron . profiler . client . stellar . VerboseProfileTest . periodUnits ) ; profileWriter . write ( m , 1 , group , ( val ) -> expectedValue ) ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > result ; result = run ( "PROFILE_VERBOSE('profile1',<sp>'entity1',<sp>PROFILE_FIXED(4,<sp>'SECONDS'))" , java . util . List . class ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( java . util . Map m : variableMappings ) { size += m . size ( ) ; } return size ; } | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testNoSuppressionSomethingElseS ( ) { net . sourceforge . pmd . Report rpt = new net . sourceforge . pmd . Report ( ) ; runTestFromString ( net . sourceforge . pmd . lang . java . SuppressWarningsTest . TEST11 , new net . sourceforge . pmd . FooRule ( ) , rpt , net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( JavaLanguageModule . NAME ) . getVersion ( "1.5" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , rpt . size ( ) ) |
processBytesFromPeerClientNextFinished ( ) { java . nio . ByteBuffer transportBuffer = java . nio . ByteBuffer . allocate ( io . grpc . alts . internal . AltsTsiHandshakerTest . TRANSPORT_BUFFER_SIZE ) ; java . nio . ByteBuffer outputFrame = java . nio . ByteBuffer . allocate ( io . grpc . alts . internal . AltsTsiHandshakerTest . OUT_FRAME_SIZE ) ; verify ( mockClient , never ( ) ) . startServerHandshake ( org . mockito . ArgumentMatchers . < java . nio . ByteBuffer > any ( ) ) ; when ( mockClient . startClientHandshake ( ) ) . thenReturn ( outputFrame ) ; when ( mockClient . next ( transportBuffer ) ) . thenReturn ( outputFrame ) ; when ( mockClient . isFinished ( ) ) . thenReturn ( true ) ; handshakerClient . getBytesToSendToPeer ( transportBuffer ) ; "<AssertPlaceHolder>" ; } processBytesFromPeer ( java . nio . ByteBuffer ) { if ( ( ( outputFrame ) == null ) && ( isClient ) ) { return true ; } if ( ( ( outputFrame ) != null ) && ( outputFrame . hasRemaining ( ) ) ) { return true ; } int remaining = bytes . remaining ( ) ; if ( ( outputFrame ) == null ) { checkState ( ( ! ( isClient ) ) , "Client<sp>handshaker<sp>should<sp>not<sp>process<sp>any<sp>frame<sp>at<sp>the<sp>beginning." ) ; outputFrame = handshaker . startServerHandshake ( bytes ) ; } else { outputFrame = handshaker . next ( bytes ) ; } if ( ( handshaker . isFinished ( ) ) || ( outputFrame . hasRemaining ( ) ) ) { return true ; } if ( ! ( bytes . hasRemaining ( ) ) ) { return false ; } checkState ( ( ( bytes . remaining ( ) ) < remaining ) , "Handshaker<sp>did<sp>not<sp>consume<sp>any<sp>bytes." ) ; return processBytesFromPeer ( bytes ) ; } | org . junit . Assert . assertTrue ( handshakerClient . processBytesFromPeer ( transportBuffer ) ) |
testOpen ( ) { org . fusesource . amqp . codec . Open in = new org . fusesource . amqp . codec . Open ( ) ; in . setChannelMax ( ( ( int ) ( Short . MAX_VALUE ) ) ) ; in . setContainerID ( "foo" ) ; in . setHostname ( "localhost" ) ; in . setOfferedCapabilities ( new org . fusesource . amqp . codec . AMQPSymbol [ ] { new org . fusesource . amqp . codec . AMQPSymbol ( new org . fusesource . hawtbuf . Buffer ( "blah" . getBytes ( ) ) ) } ) ; org . fusesource . amqp . codec . Open out = org . fusesource . amqp . codec . TestSupport . writeRead ( in ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( "Wrapper{" + "node=" ) + ( node ) ) + ",<sp>weight=" ) + ( weight ) ) + '}' ; } | org . junit . Assert . assertEquals ( in . toString ( ) , out . toString ( ) ) |
doNotGenerateInvocationIdIfLengthIsZero ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . GENERATE_INVOCATION_ID ) ) ) ) . thenReturn ( "0" ) ; "<AssertPlaceHolder>" ; } shouldGenerateInvocationId ( ) { return true ; } | org . junit . Assert . assertThat ( unit . shouldGenerateInvocationId ( ) , org . hamcrest . Matchers . is ( false ) ) |
testCreateTableTableDoesNotExist ( ) { final java . util . Collection < com . amazonaws . services . dynamodbv2 . model . AttributeDefinition > ads = java . util . Arrays . asList ( new com . amazonaws . services . dynamodbv2 . model . AttributeDefinition ( "Hash" , com . amazonaws . services . dynamodbv2 . model . ScalarAttributeType . S ) ) ; final java . util . Collection < com . amazonaws . services . dynamodbv2 . model . KeySchemaElement > kses = java . util . Arrays . asList ( new com . amazonaws . services . dynamodbv2 . model . KeySchemaElement ( "Hash" , com . amazonaws . services . dynamodbv2 . model . KeyType . HASH ) ) ; final com . amazonaws . services . dynamodbv2 . model . TableDescription description = new com . amazonaws . services . dynamodbv2 . model . TableDescription ( ) . withAttributeDefinitions ( ads ) . withKeySchema ( kses ) . withTableName ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ; final com . amazonaws . services . dynamodbv2 . model . CreateTableResult cTR = new com . amazonaws . services . dynamodbv2 . model . CreateTableResult ( ) . withTableDescription ( description ) ; org . easymock . EasyMock . expect ( dynamoDB . describeTable ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ) . andThrow ( new com . amazonaws . services . dynamodbv2 . model . ResourceNotFoundException ( null ) ) ; final com . amazonaws . services . dynamodbv2 . model . CreateTableRequest request = new com . amazonaws . services . dynamodbv2 . model . CreateTableRequest ( ) . withAttributeDefinitions ( ads ) . withKeySchema ( kses ) . withTableName ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ; org . easymock . EasyMock . expect ( dynamoDB . createTable ( request ) ) . andReturn ( cTR ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; "<AssertPlaceHolder>" ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; } createTable ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDB , com . amazonaws . services . dynamodbv2 . model . CreateTableRequest ) { try { final com . amazonaws . services . dynamodbv2 . model . DescribeTableResult result = dynamoDB . describeTable ( request . getTableName ( ) ) ; if ( ! ( request . getKeySchema ( ) . equals ( result . getTable ( ) . getKeySchema ( ) ) ) ) { throw new java . lang . IllegalStateException ( ( ( "Table<sp>" + ( request . getTableName ( ) ) ) + "<sp>already<sp>exists<sp>and<sp>has<sp>an<sp>invalid<sp>schema" ) ) ; } com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManager . LOGGER . warning ( ( ( "Table<sp>" + ( request . getTableName ( ) ) ) + "<sp>already<sp>exists" ) ) ; return result . getTable ( ) ; } catch ( final com . amazonaws . services . dynamodbv2 . model . ResourceNotFoundException e ) { return dynamoDB . createTable ( request ) . getTableDescription ( ) ; } } | org . junit . Assert . assertEquals ( description , com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManager . createTable ( dynamoDB , request ) ) |
testReadFileFromStreamNotXML ( ) { com . amazonaws . util . StringInputStream input = new com . amazonaws . util . StringInputStream ( "This<sp>is<sp>not<sp>xml" ) ; int index = 0 ; java . lang . String fileName = org . sagebionetworks . repo . manager . migration . BackupFileStreamImpl . createFileName ( MigrationType . CREDENTIAL , index ) ; try { backupFileStream . readFileFromStream ( input , backupAliasType , fileName ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } readFileFromStream ( java . io . InputStream , org . sagebionetworks . repo . model . daemon . BackupAliasType , java . lang . String ) { org . sagebionetworks . repo . model . migration . MigrationType type = org . sagebionetworks . repo . manager . migration . BackupFileStreamImpl . getTypeFromFileName ( fileName ) ; org . sagebionetworks . repo . model . dbo . MigratableDatabaseObject < D , B > mdo = typeProvider . getObjectForType ( type ) ; java . lang . String alias = org . sagebionetworks . repo . manager . migration . BackupFileStreamImpl . getAlias ( mdo , backupAliasType ) ; org . sagebionetworks . repo . model . dbo . migration . MigratableTableTranslation < D , B > translator = mdo . getTranslator ( ) ; com . thoughtworks . xstream . XStream xstream = new com . thoughtworks . xstream . XStream ( ) ; xstream . alias ( alias , mdo . getBackupClass ( ) ) ; java . util . List < B > backupObjects ; try { backupObjects = ( ( java . util . List < B > ) ( xstream . fromXML ( input ) ) ) ; } catch ( com . thoughtworks . xstream . io . StreamException e ) { if ( ! ( ( ( e . getCause ( ) ) instanceof java . io . EOFException ) && ( e . getCause ( ) . getMessage ( ) . contains ( org . sagebionetworks . repo . manager . migration . BackupFileStreamImpl . INPUT_CONTAINED_NO_DATA ) ) ) ) { throw new java . lang . RuntimeException ( e ) ; } throw new org . sagebionetworks . repo . manager . migration . EmptyFileException ( ) ; } java . util . List < org . sagebionetworks . repo . model . dbo . MigratableDatabaseObject < ? , ? > > translated = new java . util . LinkedList ( ) ; for ( B backupObject : backupObjects ) { D databaseObject = translator . createDatabaseObjectFromBackup ( backupObject ) ; translated . add ( ( ( org . sagebionetworks . repo . model . dbo . MigratableDatabaseObject < ? , ? > ) ( databaseObject ) ) ) ; } return translated ; } | org . junit . Assert . assertTrue ( ( ( e . getCause ( ) ) instanceof com . thoughtworks . xstream . io . StreamException ) ) |
testMissingValue ( ) { setUp ( ) ; initLE ( ) ; int [ ] output = le . encode ( Encoder . SENTINEL_VALUE_FOR_MISSING_DATA ) ; int [ ] expected = new int [ 45 ] ; "<AssertPlaceHolder>" ; } initLE ( ) { le = builder . build ( ) ; } | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( output , expected ) ) |
testSelection_fieldsDontExistDontReturn ( ) { org . calrissian . flowmix . api . Flow flow = new org . calrissian . flowmix . api . builder . FlowBuilder ( ) . id ( "myflow" ) . flowDefs ( ) . stream ( "stream1" ) . select ( ) . fields ( "key7" ) . end ( ) . endStream ( ) . endDefs ( ) . createFlow ( ) ; backtype . storm . generated . StormTopology topology = buildTopology ( flow , 10 ) ; backtype . storm . Config conf = new backtype . storm . Config ( ) ; conf . registerSerialization ( org . calrissian . mango . domain . event . Event . class , org . calrissian . flowmix . api . kryo . EventSerializer . class ) ; conf . setSkipMissingKryoRegistrations ( false ) ; conf . setNumWorkers ( 20 ) ; backtype . storm . LocalCluster cluster = new backtype . storm . LocalCluster ( ) ; cluster . submitTopology ( "test" , conf , topology ) ; try { java . lang . Thread . sleep ( 3000 ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } cluster . shutdown ( ) ; "<AssertPlaceHolder>" ; } getEvents ( ) { synchronized ( org . calrissian . flowmix . api . storm . bolt . MockSinkBolt . eventsReceived ) { return new java . util . ArrayList < org . calrissian . mango . domain . event . Event > ( org . calrissian . flowmix . api . storm . bolt . MockSinkBolt . eventsReceived ) ; } } | org . junit . Assert . assertEquals ( 0 , org . calrissian . flowmix . api . storm . bolt . MockSinkBolt . getEvents ( ) . size ( ) ) |
haltAfterPredicateFalse ( ) { java . util . List < java . util . Map < java . lang . String , ? > > offsets = createOrderedOffsets ( 2 ) ; io . debezium . connector . mysql . ReconcilingBinlogReader . OffsetLimitPredicate offsetLimitPredicate = new io . debezium . connector . mysql . ReconcilingBinlogReader . OffsetLimitPredicate ( offsets . get ( 0 ) , ( x ) -> true ) ; org . apache . kafka . connect . source . SourceRecord testSourceRecord = createSourceRecordWithOffset ( offsets . get ( 1 ) ) ; "<AssertPlaceHolder>" ; } accepts ( org . apache . kafka . connect . source . SourceRecord ) { io . debezium . document . Document offsetDocument = io . debezium . connector . mysql . SourceInfo . createDocumentFromOffset ( sourceRecord . sourceOffset ( ) ) ; return ! ( io . debezium . connector . mysql . SourceInfo . isPositionAtOrBefore ( leadingReaderFinalOffsetDocument , offsetDocument , gtidFilter ) ) ; } | org . junit . Assert . assertFalse ( offsetLimitPredicate . accepts ( testSourceRecord ) ) |
testSetAndGetTitle ( ) { table . setTitle ( "my<sp>title" ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return title ; } | org . junit . Assert . assertEquals ( table . getTitle ( ) , "my<sp>title" ) |
testMessageQueueRootIsCreated ( ) { org . jsoar . kernel . io . xml . XmlMessageQueue . newBuilder ( agent . getInputOutput ( ) ) . queueName ( "test-queue-root" ) . create ( ) ; agent . getProductions ( ) . loadProduction ( "testMessageQueueRootIsCreated<sp>(state<sp><s><sp>^superstate<sp>nil<sp>^io.input-link.test-queue-root)<sp>--><sp>(match)" ) ; agent . runFor ( 1 , RunType . DECISIONS ) ; "<AssertPlaceHolder>" ; } runFor ( long , org . jsoar . kernel . RunType ) { env . runFor ( n , runType ) ; for ( org . jsoar . runtime . ThreadedAgent client : clients ) { client . runFor ( n , runType ) ; } } | org . junit . Assert . assertEquals ( 1 , match . count ) |
testGetPropertyAccessorSessionScope ( ) { ognl . PropertyAccessor objectPropertyAccessor = createMock ( ognl . PropertyAccessor . class ) ; ognl . PropertyAccessor applicationContextPropertyAccessor = createMock ( ognl . PropertyAccessor . class ) ; ognl . PropertyAccessor requestScopePropertyAccessor = createMock ( ognl . PropertyAccessor . class ) ; ognl . PropertyAccessor sessionScopePropertyAccessor = createMock ( ognl . PropertyAccessor . class ) ; ognl . PropertyAccessor applicationScopePropertyAccessor = createMock ( ognl . PropertyAccessor . class ) ; org . apache . tiles . request . Request request = createMock ( org . apache . tiles . request . Request . class ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "attribute" , 1 ) ; replay ( objectPropertyAccessor , applicationContextPropertyAccessor , requestScopePropertyAccessor , sessionScopePropertyAccessor , applicationScopePropertyAccessor , request ) ; org . apache . tiles . ognl . PropertyAccessorDelegateFactory < org . apache . tiles . request . Request > factory = new org . apache . tiles . ognl . TilesContextPropertyAccessorDelegateFactory ( objectPropertyAccessor , applicationContextPropertyAccessor , requestScopePropertyAccessor , sessionScopePropertyAccessor ) ; "<AssertPlaceHolder>" ; verify ( objectPropertyAccessor , applicationContextPropertyAccessor , requestScopePropertyAccessor , sessionScopePropertyAccessor , applicationScopePropertyAccessor , request ) ; } getPropertyAccessor ( java . lang . String , org . apache . tiles . request . Request ) { ognl . PropertyAccessor retValue ; if ( propertyName . endsWith ( "Scope" ) ) { java . lang . String scopeName = propertyName . substring ( 0 , ( ( propertyName . length ( ) ) - ( ScopePropertyAccessor . SCOPE_SUFFIX_LENGTH ) ) ) ; if ( ( request . getContext ( scopeName ) ) != null ) { return scopePropertyAccessor ; } } if ( beanInfo . getMappedDescriptors ( org . apache . tiles . request . Request . class ) . containsKey ( propertyName ) ) { retValue = objectPropertyAccessor ; } else if ( beanInfo . getMappedDescriptors ( org . apache . tiles . request . ApplicationContext . class ) . containsKey ( propertyName ) ) { retValue = applicationContextPropertyAccessor ; } else { return anyScopePropertyAccessor ; } return retValue ; } | org . junit . Assert . assertEquals ( requestScopePropertyAccessor , factory . getPropertyAccessor ( "attribute" , request ) ) |
testFindBySpaceKey ( ) { net . coding . ide . entity . WorkspaceEntity ws = wsRepo . findBySpaceKey ( "qwerty" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ws . getId ( ) , org . hamcrest . Matchers . is ( 1L ) ) |
shouldGetAppropriateCostNormForProduct2 ( ) { java . lang . String sourceOfMaterialCosts = "999yetAnotherMode" ; com . qcadoo . model . api . Entity product = mockEntity ( 202L ) ; com . qcadoo . model . api . Entity orderMaterialCosts = mockEntity ( ) ; stubOrderMaterialCostsSearchResults ( com . google . common . collect . ImmutableMap . of ( product . getId ( ) , orderMaterialCosts ) ) ; com . qcadoo . model . api . Entity results = productsCostCalculationService . getAppropriateCostNormForProduct ( product , order , sourceOfMaterialCosts ) ; "<AssertPlaceHolder>" ; } getAppropriateCostNormForProduct ( com . qcadoo . model . api . Entity , com . qcadoo . model . api . Entity , java . lang . String ) { if ( "01currentGlobalDefinitionsInProduct" . equals ( sourceOfMaterialCosts ) ) { return product ; } for ( com . qcadoo . model . api . Entity orderMaterialCosts : findOrderMaterialCosts ( order , product ) . asSet ( ) ) { return orderMaterialCosts ; } throw new java . lang . IllegalStateException ( ( ( ( "Product<sp>with<sp>number=" + ( product . getId ( ) ) ) + "<sp>doesn't<sp>exists<sp>for<sp>order<sp>with<sp>id=" ) + ( order . getId ( ) ) ) ) ; } | org . junit . Assert . assertEquals ( orderMaterialCosts , results ) |
testVirtualGetItemDoesNotFireSetDataEvent ( ) { final org . eclipse . swt . widgets . LoggingListener log = new org . eclipse . swt . widgets . LoggingListener ( ) ; tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; tree . setItemCount ( 100 ) ; tree . setSize ( 100 , 100 ) ; tree . addListener ( SWT . SetData , log ) ; tree . getItem ( 99 ) ; "<AssertPlaceHolder>" ; } size ( ) { return new org . eclipse . jface . internal . databinding . swt . ControlSizeProperty ( ) ; } | org . junit . Assert . assertEquals ( 0 , log . size ( ) ) |
test_round_2up ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . rounded ( 2 , RoundingMode . DOWN ) ; "<AssertPlaceHolder>" ; } rounded ( int , java . math . RoundingMode ) { return with ( money . rounded ( scale , roundingMode ) ) ; } | org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test ) |
createItem ( ) { com . podio . item . map . BugMap1 bug = new com . podio . item . map . BugMap1 ( 1 , java . util . Collections . singleton ( HireStatus . YES ) , org . joda . money . Money . of ( CurrencyUnit . EUR , new java . math . BigDecimal ( "123.45" ) ) , "A<sp>mexican<sp>in<sp>a<sp>bar" , new java . math . BigDecimal ( "1.2" ) , 30 , "Ignored" ) ; int itemId = getMappedAPI ( com . podio . item . map . BugMap1 . class ) . insert ( bug , true ) ; "<AssertPlaceHolder>" ; } insert ( T , boolean ) { return factory . getAPI ( com . podio . item . ItemAPI . class ) . addItem ( application . getId ( ) , map . getCreate ( object ) , silent ) ; } | org . junit . Assert . assertTrue ( ( itemId > 0 ) ) |
testOnContainerConfigurationsChangeWithConfigs ( ) { java . util . List < org . guvnor . ala . ui . client . wizard . container . ContainerConfig > containerConfigs = mockContainerConfigList ( org . guvnor . ala . ui . openshift . client . pipeline . template . TemplateParamsFormPresenterTest . CONTAINER_CONFIG_COUNT ) ; presenter . onContainerConfigurationsChange ( new org . guvnor . ala . ui . client . wizard . container . ContainerConfigParamsChangeEvent ( containerConfigs ) ) ; java . util . Map < java . lang . String , java . lang . String > params = presenter . buildParams ( ) ; java . lang . String containerParam = params . get ( org . guvnor . ala . ui . openshift . client . pipeline . template . TemplateParamsFormPresenter . KIE_SERVER_CONTAINER_DEPLOYMENT ) ; java . lang . String expectedContainerParam = buildExpectedContainerDeploymentParamValue ( containerConfigs ) ; "<AssertPlaceHolder>" ; } buildExpectedContainerDeploymentParamValue ( java . util . List ) { return presenter . buildContainerDeploymentParamValue ( containerConfigs ) ; } | org . junit . Assert . assertEquals ( expectedContainerParam , containerParam ) |
testGetJenkinsServersNotAuthed ( ) { when ( authContext . isAuthenticated ( ) ) . thenReturn ( false ) ; javax . ws . rs . core . Response actual = rest . getJenkinsServers ( repository ) ; "<AssertPlaceHolder>" ; } getJenkinsServers ( com . atlassian . bitbucket . repository . Repository ) { if ( authContext . isAuthenticated ( ) ) { java . lang . String projectKey = repository . getProject ( ) . getKey ( ) ; com . kylenicholls . stash . parameterizedbuilds . rest . List < com . kylenicholls . stash . parameterizedbuilds . rest . Map < java . lang . String , java . lang . String > > servers = new com . kylenicholls . stash . parameterizedbuilds . rest . ArrayList ( ) ; com . kylenicholls . stash . parameterizedbuilds . rest . Optional . ofNullable ( jenkins . getJenkinsServer ( projectKey ) ) . map ( ( x ) -> createServerMap ( x , projectKey ) ) . ifPresent ( servers :: add ) ; com . kylenicholls . stash . parameterizedbuilds . rest . Optional . ofNullable ( jenkins . getJenkinsServer ( null ) ) . map ( ( x ) -> createServerMap ( x , null ) ) . ifPresent ( servers :: add ) ; return javax . ws . rs . core . Response . ok ( servers ) . build ( ) ; } else { return javax . ws . rs . core . Response . status ( Response . Status . FORBIDDEN ) . build ( ) ; } } | org . junit . Assert . assertEquals ( Response . Status . FORBIDDEN . getStatusCode ( ) , actual . getStatus ( ) ) |
testSupports_String ( ) { System . out . println ( "supports(String)" ) ; org . dspace . services . factory . DSpaceServicesFactory . getInstance ( ) . getConfigurationService ( ) . setProperty ( "handle.prefix" , "123456789" ) ; org . dspace . services . factory . DSpaceServicesFactory . getInstance ( ) . getConfigurationService ( ) . setProperty ( "handle.additional.prefixes" , "123456789.1,123456789.2" ) ; org . dspace . identifier . HandleIdentifierProvider instance = new org . dspace . identifier . HandleIdentifierProvider ( ) ; org . dspace . identifier . HandleIdentifierProviderTest . applicationContext . getAutowireCapableBeanFactory ( ) . autowireBeanProperties ( instance , AutowireCapableBeanFactory . AUTOWIRE_BY_TYPE , true ) ; java . util . Properties forms = new java . util . Properties ( ) ; try { forms . load ( this . getClass ( ) . getResourceAsStream ( "handle-forms.properties" ) ) ; } catch ( java . io . IOException e ) { System . err . format ( "Could<sp>not<sp>load<sp>handle-forms.properties:<sp>%s%n" , e . getMessage ( ) ) ; return ; } for ( Map . Entry < java . lang . Object , java . lang . Object > entry : forms . entrySet ( ) ) { java . lang . String identifier = ( ( java . lang . String ) ( entry . getKey ( ) ) ) ; boolean expResult = java . lang . Boolean . parseBoolean ( ( ( java . lang . String ) ( entry . getValue ( ) ) ) ) ; boolean result = instance . supports ( identifier ) ; java . lang . String message = ( expResult ) ? "This<sp>provider<sp>should<sp>support<sp>" + identifier : "This<sp>provider<sp>should<sp>not<sp>support<sp>" + identifier ; "<AssertPlaceHolder>" ; } } supports ( java . lang . Class ) { return org . springframework . security . authentication . UsernamePasswordAuthenticationToken . class . isAssignableFrom ( authentication ) ; } | org . junit . Assert . assertEquals ( message , expResult , result ) |
shouldCompareOnlyTheContentForEquality ( ) { java . security . cert . X509Certificate certificate1 = mock ( java . security . cert . X509Certificate . class ) ; java . security . cert . X509Certificate certificate2 = mock ( java . security . cert . X509Certificate . class ) ; java . security . cert . X509CRL crl = mock ( java . security . cert . X509CRL . class ) ; byte [ ] encodedContent = new byte [ ] { 'f' , 'o' , 'o' } ; net . ripe . rpki . commons . provisioning . cms . ProvisioningCmsObject cms1 = new net . ripe . rpki . commons . provisioning . cms . ProvisioningCmsObject ( encodedContent , certificate1 , java . util . Collections . < java . security . cert . X509Certificate > emptySet ( ) , crl , null ) ; net . ripe . rpki . commons . provisioning . cms . ProvisioningCmsObject cms2 = new net . ripe . rpki . commons . provisioning . cms . ProvisioningCmsObject ( encodedContent , certificate2 , java . util . Collections . < java . security . cert . X509Certificate > emptySet ( ) , crl , null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( cms1 , cms2 ) |
testGetServiceByIdAuthzSubjectInteger ( ) { org . hyperic . hq . product . ServiceTypeInfo sinfo = new org . hyperic . hq . product . ServiceTypeInfo ( ) ; sinfo . setDescription ( "Test<sp>ServiceType<sp>Desc" ) ; sinfo . setInternal ( false ) ; sinfo . setName ( "Test<sp>ServiceType<sp>Name" ) ; org . hyperic . hq . appdef . server . session . ServiceType serviceType = serviceManager . createServiceType ( sinfo , "Test<sp>Service<sp>Plugin" , testServerType ) ; org . hyperic . hq . appdef . server . session . Service service = serviceManager . createService ( subject , testServers . get ( 0 ) . getId ( ) , serviceType . getId ( ) , "Test<sp>Service<sp>Name" , "Test<sp>Service<sp>Desc" , "my<sp>computer" ) ; "<AssertPlaceHolder>" ; } getServiceById ( org . hyperic . hq . authz . server . session . AuthzSubject , java . lang . Integer ) { org . hyperic . hq . appdef . server . session . Service service = findServiceById ( id ) ; permissionManager . checkViewPermission ( subject , service . getEntityId ( ) ) ; return service ; } | org . junit . Assert . assertEquals ( service , serviceManager . getServiceById ( subject , service . getId ( ) ) ) |
longstream_builder ( ) { long sum = java . util . stream . LongStream . builder ( ) . add ( 10 ) . add ( 10 ) . build ( ) . sum ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 20 , sum , 0 ) |
testPattern ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "string-length(//xs:element[@name='patternField']//xs:pattern/@value)<sp>=<sp>10" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testConstructors ( ) { gov . sandia . cognition . data . convert . ObjectToStringConverter instance = new gov . sandia . cognition . data . convert . ObjectToStringConverter ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( instance ) |
sendMessageAcknowledgementSendsMessageAcknowledgement ( ) { final int expectedMessageId = 134 ; tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Mqtt mockMqtt = instantiateMqtt ( true ) ; new tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . NonStrictExpectations ( ) { { tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Deencapsulation . invoke ( mockedMqttConnection , "sendMessageAcknowledgement" , expectedMessageId ) ; result = true ; } } ; boolean result = tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Deencapsulation . invoke ( mockMqtt , "sendMessageAcknowledgement" , expectedMessageId ) ; "<AssertPlaceHolder>" ; new tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Verifications ( ) { { tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . Deencapsulation . invoke ( mockedMqttConnection , "sendMessageAcknowledgement" , expectedMessageId ) ; times = 1 ; } } ; } instantiateMqtt ( boolean ) { return instantiateMqtt ( withParameters , null ) ; } | org . junit . Assert . assertTrue ( result ) |
entitySetTwoPrimNoMetadata ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . entityContainer . getEntitySet ( "ESTwoPrim" ) ; final org . apache . olingo . commons . api . data . EntityCollection entitySet = data . readAll ( edmEntitySet ) ; final java . lang . String resultString = org . apache . commons . io . IOUtils . toString ( serializerNoMetadata . entityCollection ( org . apache . olingo . server . core . serializer . json . ODataJsonSerializerTest . metadata , edmEntitySet . getEntityType ( ) , entitySet , org . apache . olingo . server . api . serializer . EntityCollectionSerializerOptions . with ( ) . contextURL ( org . apache . olingo . commons . api . data . ContextURL . with ( ) . entitySet ( edmEntitySet ) . build ( ) ) . build ( ) ) . getContent ( ) ) ; final java . lang . String expectedResult = "{\"value\":[" + ( ( ( "{\"PropertyInt16\":32766,\"PropertyString\":\"Test<sp>String1\"}," + "{\"PropertyInt16\":-365,\"PropertyString\":\"Test<sp>String2\"}," ) + "{\"PropertyInt16\":-32766,\"PropertyString\":[" 0 ) + "{\"PropertyInt16\":32767,\"PropertyString\":\"Test<sp>String4\"}]}" ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return new java . io . ByteArrayInputStream ( content . toByteArray ( ) ) ; } | org . junit . Assert . assertEquals ( expectedResult , resultString ) |
testJSONLD ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . Graph . create ( true ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; java . lang . String init = ( ( ( ( ( ( ( fr . inria . corese . test . engine . TestQuery1 . FOAF_PREF ) + "insert<sp>data<sp>{" ) + "foaf:knows<sp>rdfs:domain<sp>foaf:Person<sp>;<sp>rdfs:range<sp>foaf:Person<sp>." ) + "<John><sp>foaf:knows<sp><Jim><sp>" ) + "<Jim><sp>foaf:knows<sp><James><sp>" ) + "<Jack><sp>foaf:knows<sp><Jim><sp>" ) + "<James><sp>a<sp>foaf:Person" ) + "}" ; exec . query ( init ) ; fr . inria . corese . core . print . JSONLDFormat jf = fr . inria . corese . core . print . JSONLDFormat . create ( g ) ; java . lang . String str = jf . toString ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return topXBottomY . size ( ) ; } | org . junit . Assert . assertEquals ( true , ( ( str . length ( ) ) > 0 ) ) |
encodeUpgradePacket ( ) { encodePacket ( new io . socket . engineio . parser . Packet < java . lang . String > ( Packet . UPGRADE ) , new io . socket . engineio . parser . EncodeCallback < java . lang . String > ( ) { @ io . socket . engineio . parser . Override public void call ( java . lang . String data ) { io . socket . engineio . parser . Packet p = decodePacket ( data ) ; "<AssertPlaceHolder>" ; } } ) ; } decodePacket ( java . lang . String ) { return io . socket . engineio . parser . Parser . decodePacket ( data , false ) ; } | org . junit . Assert . assertThat ( p . type , org . hamcrest . CoreMatchers . is ( Packet . UPGRADE ) ) |
testDecisionDiagramRetrieval ( ) { java . io . File file = getFile ( "/processes/todo-process.png" ) ; when ( repositoryServiceMock . getDecisionDiagram ( MockProvider . EXAMPLE_DECISION_DEFINITION_ID ) ) . thenReturn ( new java . io . FileInputStream ( file ) ) ; byte [ ] actual = io . restassured . RestAssured . given ( ) . pathParam ( "id" , MockProvider . EXAMPLE_DECISION_DEFINITION_ID ) . expect ( ) . statusCode ( Status . OK . getStatusCode ( ) ) . contentType ( "image/png" ) . header ( "Content-Disposition" , ( "attachment;<sp>filename=" + ( org . camunda . bpm . engine . rest . helper . MockProvider . EXAMPLE_DECISION_DEFINITION_DIAGRAM_RESOURCE_NAME ) ) ) . when ( ) . get ( org . camunda . bpm . engine . rest . DecisionDefinitionRestServiceInteractionTest . DIAGRAM_DEFINITION_URL ) . getBody ( ) . asByteArray ( ) ; verify ( repositoryServiceMock ) . getDecisionDefinition ( MockProvider . EXAMPLE_DECISION_DEFINITION_ID ) ; verify ( repositoryServiceMock ) . getDecisionDiagram ( MockProvider . EXAMPLE_DECISION_DEFINITION_ID ) ; byte [ ] expected = org . camunda . bpm . engine . impl . util . IoUtil . readInputStream ( new java . io . FileInputStream ( file ) , "decision<sp>diagram" ) ; "<AssertPlaceHolder>" ; } readInputStream ( java . io . InputStream , java . lang . String ) { java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 16 * 1024 ] ; try { int bytesRead = inputStream . read ( buffer ) ; while ( bytesRead != ( - 1 ) ) { outputStream . write ( buffer , 0 , bytesRead ) ; bytesRead = inputStream . read ( buffer ) ; } } catch ( java . lang . Exception e ) { throw org . camunda . bpm . engine . impl . util . IoUtil . LOG . exceptionWhileReadingStream ( inputStreamName , e ) ; } return outputStream . toByteArray ( ) ; } | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testTypeAny ( ) { java . lang . String className = "testTypeAny" ; final com . orientechnologies . orient . core . metadata . schema . OSchema oSchema = db . getMetadata ( ) . getSchema ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass oClass = oSchema . createClass ( className ) ; com . orientechnologies . orient . core . record . impl . ODocument record = db . newInstance ( className ) ; record . field ( "name" , "foo" ) ; record . save ( ) ; oClass . createProperty ( "name" , OType . ANY ) ; com . orientechnologies . orient . core . metadata . schema . List < ? > result = db . query ( new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery < java . lang . Object > ( ( ( "select<sp>from<sp>" + className ) + "<sp>where<sp>name<sp>=<sp>'foo'" ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; } | org . junit . Assert . assertEquals ( result . size ( ) , 1 ) |
testFriendlyFormatDefaultLocale ( ) { org . joda . time . DateTime dateTime = org . multibit . common . DateUtils . thenUtc ( 2000 , 1 , 1 , 0 , 0 , 0 ) ; java . lang . String expectedDateString = "Saturday,<sp>January<sp>01" ; java . lang . String actualDateString = org . multibit . common . DateUtils . formatFriendlyDate ( dateTime ) ; "<AssertPlaceHolder>" ; } formatFriendlyDate ( org . joda . time . ReadableInstant ) { return org . multibit . common . DateUtils . friendlyDateFormatter . print ( when ) ; } | org . junit . Assert . assertEquals ( expectedDateString , actualDateString ) |
testParseDate ( ) { com . github . resource4j . converters . Calendar expected = new com . github . resource4j . converters . GregorianCalendar ( 1997 , Calendar . JULY , 16 ) ; com . github . resource4j . converters . Date date = com . github . resource4j . converters . TypeConverter . convert ( "1997-07-16" , com . github . resource4j . converters . Date . class , new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class , java . lang . String ) { return com . github . resource4j . converters . TypeConverter . converter ( ) . doConvert ( fromValue , toType , format ) ; } | org . junit . Assert . assertEquals ( expected . getTime ( ) , date ) |
stderrMessageShouldBeDetected ( ) { java . lang . String content = ( MessageType . STDERR . getPrefix ( ) ) + ( org . eclipse . che . ide . ext . runner . client . tabs . console . panel . MessageTypeTest . SOME_TEXT ) ; "<AssertPlaceHolder>" ; } detect ( java . lang . String ) { for ( org . eclipse . che . ide . ext . runner . client . tabs . console . panel . MessageType type : org . eclipse . che . ide . ext . runner . client . tabs . console . panel . MessageType . values ( ) ) { if ( content . startsWith ( type . getPrefix ( ) ) ) { return type ; } } return org . eclipse . che . ide . ext . runner . client . tabs . console . panel . MessageType . UNDEFINED ; } | org . junit . Assert . assertThat ( org . eclipse . che . ide . ext . runner . client . tabs . console . panel . MessageType . detect ( content ) , org . hamcrest . CoreMatchers . is ( MessageType . STDERR ) ) |
testElimina ( ) { log . debug ( "Debiera<sp>eliminar<sp>colportor" ) ; mx . edu . um . mateo . colportor . test . Usuario usuario = obtieneAsociado ( ) ; this . authenticate ( usuario , usuario . getPassword ( ) , new java . util . ArrayList < org . springframework . security . core . GrantedAuthority > ( usuario . getRoles ( ) ) ) ; mx . edu . um . mateo . colportor . model . Colportor colportor = new mx . edu . um . mateo . colportor . model . Colportor ( "username" , "test" , "test" , "apPaterno" , "apMaterno" , "test" , mx . edu . um . mateo . general . utils . Constantes . STATUS_ACTIVO , "8262652626" , "test" , "test" , "10706" , "test" , "test001" , new java . util . Date ( ) ) ; colportor . setAlmacen ( usuario . getAlmacen ( ) ) ; colportor . setEmpresa ( usuario . getEmpresa ( ) ) ; currentSession ( ) . save ( colportor ) ; "<AssertPlaceHolder>" ; this . mockMvc . perform ( post ( Constantes . PATH_COLPORTOR_ELIMINA ) . param ( "id" , colportor . getId ( ) . toString ( ) ) ) . andExpect ( flash ( ) . attributeExists ( Constantes . CONTAINSKEY_MESSAGE ) ) . andExpect ( flash ( ) . attribute ( Constantes . CONTAINSKEY_MESSAGE , "colportor.eliminado.message" ) ) . andExpect ( redirectedUrl ( Constantes . PATH_COLPORTOR ) ) ; } getId ( ) { return id ; } | org . junit . Assert . assertNotNull ( colportor . getId ( ) ) |
testGetServiceList ( ) { System . out . println ( "getServiceList" ) ; eu . impact_project . wsclient . ServiceProvider instance = new eu . impact_project . wsclient . ServiceProviderTest . ServiceProviderImpl ( ) ; java . util . List < eu . impact_project . wsclient . ServiceProvider . Service > expResult = null ; java . util . List < eu . impact_project . wsclient . ServiceProvider . Service > result = instance . getServiceList ( ) ; "<AssertPlaceHolder>" ; } getServiceList ( ) { return services ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testShort ( ) { java . lang . String [ ] shortSentence = new java . lang . String [ ] { "I" , "know" , "it" } ; final int testTokenIndex = 1 ; opennlp . tools . util . featuregen . AdaptiveFeatureGenerator generator = new opennlp . tools . util . featuregen . lang . jpn . TrigramNameFeatureGenerator ( ) ; generator . createFeatures ( features , shortSentence , testTokenIndex , null ) ; "<AssertPlaceHolder>" ; } createFeatures ( java . util . List , java . lang . String [ ] , int , java . lang . String [ ] ) { if ( useAux ) { if ( ! ( java . util . Arrays . equals ( cachedWordAndAuxes , wordAndAuxes ) ) ) { cachedWordAndAuxes = wordAndAuxes ; cached = opennlp . tools . namefind . AuxiliaryInfoUtil . getAuxParts ( wordAndAuxes ) ; } } else { if ( ! ( java . util . Arrays . equals ( cachedWordAndAuxes , wordAndAuxes ) ) ) { cachedWordAndAuxes = wordAndAuxes ; cached = opennlp . tools . namefind . AuxiliaryInfoUtil . getWordParts ( wordAndAuxes ) ; } } generator . createFeatures ( features , cached , index , previousOutcomes ) ; } | org . junit . Assert . assertEquals ( 0 , features . size ( ) ) |
givenUnSubscribedEvent_whenEventHandledByDeadEvent_thenSuccess ( ) { listener . resetEventsHandled ( ) ; eventBus . post ( 12345 ) ; "<AssertPlaceHolder>" ; } getEventsHandled ( ) { return org . baeldung . guava . EventListener . eventsHandled ; } | org . junit . Assert . assertEquals ( 1 , listener . getEventsHandled ( ) ) |
getid ( ) { int gid = groupApi . getGroupByOpenId ( "owGBft_vbBbOaQOmpEUE4xDLeRSU" ) ; "<AssertPlaceHolder>" ; } getGroupByOpenId ( java . lang . String ) { java . lang . String group_getid_uri = getRequestUri ( "group_getid_uri" ) ; com . foxinmy . weixin4j . model . Token token = tokenManager . getCache ( ) ; com . foxinmy . weixin4j . http . weixin . WeixinResponse response = weixinExecutor . post ( java . lang . String . format ( group_getid_uri , token . getAccessToken ( ) ) , java . lang . String . format ( "{\"openid\":\"%s\"}" , openId ) ) ; return response . getAsJson ( ) . getIntValue ( "groupid" ) ; } | org . junit . Assert . assertTrue ( ( gid >= 0 ) ) |
whenAnExecutorDiesHardANewExecutorTakesItsPlace ( ) { j . jenkins . setNumExecutors ( 1 ) ; hudson . model . Computer c = j . jenkins . toComputer ( ) ; hudson . model . Executor e = getExecutorByNumber ( c , 0 ) ; j . jenkins . getQueue ( ) . schedule ( new hudson . model . QueueTest . TestTask ( new java . util . concurrent . atomic . AtomicInteger ( ) ) { @ hudson . model . Override public Queue . Executable createExecutable ( ) throws java . io . IOException { throw new java . lang . IllegalStateException ( "oops" ) ; } } , 0 ) ; while ( e . isActive ( ) ) { java . lang . Thread . sleep ( 10 ) ; } waitUntilExecutorSizeIs ( c , 1 ) ; "<AssertPlaceHolder>" ; } getExecutorByNumber ( hudson . model . Computer , int ) { for ( hudson . model . Executor executor : c . getExecutors ( ) ) { if ( ( executor . getNumber ( ) ) == executorNumber ) { return executor ; } } return null ; } | org . junit . Assert . assertNotNull ( getExecutorByNumber ( c , 0 ) ) |
test ( ) { final i5 . las2peer . security . UserAgentImpl eve = i5 . las2peer . testing . MockAgentFactory . getEve ( ) ; eve . unlock ( "evespass" ) ; final i5 . las2peer . p2p . MessageResultListener l = new i5 . las2peer . p2p . MessageResultListener ( 10000 ) { @ i5 . las2peer . p2p . Override public void notifySuccess ( ) { System . out . println ( "success" ) ; } } ; new java . lang . Thread ( new java . lang . Runnable ( ) { @ i5 . las2peer . p2p . Override public void run ( ) { try { java . lang . Thread . sleep ( 4000 ) ; l . collectAnswer ( new i5 . las2peer . communication . Message ( eve , eve , "fertig" ) ) ; } catch ( java . lang . Exception e ) { } } } ) . start ( ) ; l . waitForOneAnswer ( ) ; "<AssertPlaceHolder>" ; } isSuccess ( ) { synchronized ( this ) { return ( isFinished ( ) ) && ( collected ) ; } } | org . junit . Assert . assertTrue ( l . isSuccess ( ) ) |
isActive ( ) { org . onlab . packet . lacp . LacpState state = new org . onlab . packet . lacp . LacpState ( ( ( byte ) ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } isActive ( ) { return isActive ; } | org . junit . Assert . assertTrue ( state . isActive ( ) ) |
testRemoveHtmlClassString ( ) { com . github . bordertech . wcomponents . AbstractWComponent comp = new com . github . bordertech . wcomponents . AbstractWComponent_Test . SimpleComponent ( ) ; comp . setHtmlClass ( "foo" ) ; comp . removeHtmlClass ( "foo" ) ; "<AssertPlaceHolder>" ; } getHtmlClass ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; } | org . junit . Assert . assertNull ( comp . getHtmlClass ( ) ) |
assertEqualsWithSameQualifiedName ( ) { org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem orderItem1 = new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( "tbl" , "column_name" , org . apache . shardingsphere . core . constant . OrderDirection . ASC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) ; orderItem1 . setAlias ( "column_alias" ) ; org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem orderItem2 = new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( "tbl" , "column_name" , org . apache . shardingsphere . core . constant . OrderDirection . ASC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) ; "<AssertPlaceHolder>" ; } setAlias ( java . lang . String ) { this . alias = org . apache . shardingsphere . core . parse . util . SQLUtil . getExactlyValue ( alias ) ; } | org . junit . Assert . assertThat ( orderItem1 , org . hamcrest . CoreMatchers . is ( orderItem2 ) ) |
testIfExternalOverridingIsFalseAndCustomIsFalseAndGlobalIsFalse ( ) { org . apache . cxf . message . Message message = org . easymock . EasyMock . createMock ( org . apache . cxf . message . MessageImpl . class ) ; org . easymock . EasyMock . expect ( message . getContextualProperty ( org . talend . esb . sam . agent . wiretap . WireTapHelperTest . EXTERNAL_PROPERTY_NAME ) ) . andReturn ( new java . lang . Object ( ) ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( message ) ; boolean result = org . talend . esb . sam . agent . wiretap . WireTapHelper . isMessageContentToBeLogged ( message , false , false ) ; org . easymock . EasyMock . verify ( message ) ; "<AssertPlaceHolder>" ; } isMessageContentToBeLogged ( org . apache . cxf . message . Message , boolean , boolean ) { if ( ! logMessageContentOverride ) { return logMessageContent ; } java . lang . Object logMessageContentExtObj = message . getContextualProperty ( org . talend . esb . sam . agent . wiretap . WireTapHelper . EXTERNAL_PROPERTY_NAME ) ; if ( null == logMessageContentExtObj ) { return logMessageContent ; } else if ( logMessageContentExtObj instanceof java . lang . Boolean ) { return ( ( java . lang . Boolean ) ( logMessageContentExtObj ) ) . booleanValue ( ) ; } else if ( logMessageContentExtObj instanceof java . lang . String ) { java . lang . String logMessageContentExtVal = ( ( java . lang . String ) ( logMessageContentExtObj ) ) ; if ( logMessageContentExtVal . equalsIgnoreCase ( "true" ) ) { return true ; } else if ( logMessageContentExtVal . equalsIgnoreCase ( "false" ) ) { return false ; } else { return logMessageContent ; } } else { return logMessageContent ; } } | org . junit . Assert . assertEquals ( false , result ) |
testIsLessThanOrEqual ( ) { org . opennms . netmgt . model . OnmsSeverity major = OnmsSeverity . MAJOR ; org . opennms . netmgt . model . OnmsSeverity minor = OnmsSeverity . MINOR ; "<AssertPlaceHolder>" ; } isLessThanOrEqual ( org . opennms . netmgt . model . OnmsSeverity ) { return ( compareTo ( other ) ) <= 0 ; } | org . junit . Assert . assertTrue ( minor . isLessThanOrEqual ( major ) ) |
testRemoteIPAddressConverter ( ) { ch . qos . logback . access . pattern . RemoteIPAddressConverter converter = new ch . qos . logback . access . pattern . RemoteIPAddressConverter ( ) ; converter . start ( ) ; java . lang . String result = converter . convert ( event ) ; "<AssertPlaceHolder>" ; } getRemoteAddr ( ) { if ( ( remoteAddr ) == null ) { if ( ( httpRequest ) != null ) { remoteAddr = httpRequest . getRemoteAddr ( ) ; } else { remoteAddr = NA ; } } return remoteAddr ; } | org . junit . Assert . assertEquals ( request . getRemoteAddr ( ) , result ) |
testGetDatabase_nofile ( ) { final com . restlet . sqlimport . model . sql . Database database = sqlImport . getDatabase ( null ) ; "<AssertPlaceHolder>" ; } getDatabase ( java . lang . String ) { if ( content == null ) { return null ; } final com . restlet . sqlimport . parser . GetSqlQuery getSqlQuery = new com . restlet . sqlimport . parser . GetSqlQuery ( getReport ( ) ) ; final java . util . List < java . lang . String > querys = getSqlQuery . getSqlQuerys ( content ) ; final com . restlet . sqlimport . model . sql . Database database = read ( querys ) ; return database ; } | org . junit . Assert . assertNull ( database ) |
testOverweight ( ) { java . lang . String string0 = com . examples . with . different . packagename . BMICalculator . calculateBMICategory ( ( - 1.0 ) , 25.0 ) ; "<AssertPlaceHolder>" ; } calculateBMICategory ( double , double ) { double bmi = weight / ( height * height ) ; if ( bmi < 18.5 ) { return "underweight" ; } else if ( bmi < 25 ) { return "healthy" ; } else if ( bmi < 30 ) { return "overweight" ; } else if ( bmi < 40 ) { return "obese" ; } else { return "very<sp>obese" ; } } | org . junit . Assert . assertEquals ( "overweight" , string0 ) |
testConfigurationStringWithForbiddenKeysInUpperCase ( ) { java . lang . String configuration = ( ( ( ( ( ( "var1=aaa" + ( LINE_SEPARATOR ) ) + "var2=bbb" ) + ( LINE_SEPARATOR ) ) + "var3=ccc" ) + ( LINE_SEPARATOR ) ) + "FORBIDDEN.OPTION=ddd" ) + ( LINE_SEPARATOR ) ; io . strimzi . operator . cluster . model . OrderedProperties expectedConfiguration = createWithDefaults ( "var3" , "ccc" , "var2" , "bbb" , "var1" , "aaa" ) ; io . strimzi . operator . cluster . model . AbstractConfiguration config = new io . strimzi . operator . cluster . model . TestConfiguration ( configuration ) ; "<AssertPlaceHolder>" ; } asOrderedProperties ( ) { return options ; } | org . junit . Assert . assertEquals ( expectedConfiguration , config . asOrderedProperties ( ) ) |
testGeefPersonenOpAdresMetBetrokkenheden ( ) { initMocks ( nl . bzk . brp . model . bevraging . bijhouding . GeefPersonenOpAdresMetBetrokkenhedenBericht . class , SoortBericht . BHG_BVG_GEEF_PERSONEN_OP_ADRES_MET_BETROKKENHEDEN ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . business . dto . bevraging . BevragingResultaat . class , true ) ; final nl . bzk . brp . model . bevraging . bijhouding . GeefPersonenOpAdresMetBetrokkenhedenAntwoordBericht testBericht = mock ( nl . bzk . brp . model . bevraging . bijhouding . GeefPersonenOpAdresMetBetrokkenhedenAntwoordBericht . class ) ; when ( getAntwoordBerichtFactory ( ) . bouwAntwoordBericht ( any ( nl . bzk . brp . model . logisch . ber . Bericht . class ) , any ( nl . bzk . brp . business . dto . bevraging . BevragingResultaat . class ) ) ) . thenReturn ( testBericht ) ; final nl . bzk . brp . model . bevraging . bijhouding . GeefPersonenOpAdresMetBetrokkenhedenAntwoordBericht resultaat = ( ( nl . bzk . brp . web . service . BijhoudingBevragingService ) ( getWebService ( ) ) ) . geefPersonenOpAdresMetBetrokkenheden ( ( ( nl . bzk . brp . model . bevraging . bijhouding . GeefPersonenOpAdresMetBetrokkenhedenBericht ) ( getBericht ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getBericht ( ) { return bericht ; } | org . junit . Assert . assertEquals ( testBericht , resultaat ) |
testPagingWithEmptyResult ( ) { info . smart_tools . smartactors . database_in_memory . in_memory_database . InMemoryDatabase database = new info . smart_tools . smartactors . database_in_memory . in_memory_database . InMemoryDatabase ( ) ; database . createCollection ( "collection_name" ) ; info . smart_tools . smartactors . iobject . iobject . IObject document = new info . smart_tools . smartactors . iobject . ds_object . DSObject ( "{\"a\":<sp>[\"b\",<sp>1]}" ) ; info . smart_tools . smartactors . iobject . iobject . IObject document2 = new info . smart_tools . smartactors . iobject . ds_object . DSObject ( "{\"c\":<sp>[\"b\",<sp>2]}" ) ; info . smart_tools . smartactors . iobject . iobject . IObject document3 = new info . smart_tools . smartactors . iobject . ds_object . DSObject ( "{\"c\",<sp>2]}" 0 ) ; info . smart_tools . smartactors . iobject . iobject . IObject document4 = new info . smart_tools . smartactors . iobject . ds_object . DSObject ( "{\"a\":<sp>{\"b\":<sp>3}}" ) ; database . insert ( document , "collection_name" ) ; database . insert ( document2 , "collection_name" ) ; database . insert ( document3 , "collection_name" ) ; database . insert ( document4 , "collection_name" ) ; java . util . List < info . smart_tools . smartactors . iobject . iobject . IObject > outputList = database . select ( new info . smart_tools . smartactors . iobject . ds_object . DSObject ( "{\"filter\":{},<sp>\"page\":<sp>{\"size\":<sp>1,<sp>\"number\":5}}" ) , "collection_name" ) ; "<AssertPlaceHolder>" ; } size ( ) { return template . size ( ) ; } | org . junit . Assert . assertTrue ( ( ( outputList . size ( ) ) == 0 ) ) |
isRoot_notRoot ( ) { "<AssertPlaceHolder>" ; } isRoot ( ) { org . junit . Assert . assertTrue ( new org . talend . dataprep . folder . store . file . FolderPath ( ) . isRoot ( ) ) ; } | org . junit . Assert . assertFalse ( new org . talend . dataprep . folder . store . file . FolderPath ( "foo" ) . isRoot ( ) ) |
testDateTimeWithDefaultFormat ( ) { com . owlike . genson . ext . jodatime . DateTime now = com . owlike . genson . ext . jodatime . DateTime . now ( ) ; java . lang . String json = genson . serialize ( now ) ; "<AssertPlaceHolder>" ; } deserialize ( com . owlike . genson . stream . ObjectReader , com . owlike . genson . Context ) { T obj ; if ( options . isAsTimestamp ( ) ) { switch ( options . getTimestampFormat ( ) ) { case ARRAY : obj = readArray ( reader ) ; break ; case OBJECT : obj = readObject ( reader ) ; break ; default : throw new java . lang . IllegalArgumentException ( "Unsupported<sp>timestamp<sp>format" ) ; } } else { obj = parseFunction . apply ( reader . valueAsString ( ) ) ; } return obj ; } | org . junit . Assert . assertEquals ( now , genson . deserialize ( json , com . owlike . genson . ext . jodatime . DateTime . class ) ) |
testExtras_jsonValue ( ) { com . google . gson . JsonObject extraValue = new com . google . gson . JsonObject ( ) ; extraValue . add ( "v_key" , new com . google . gson . JsonPrimitive ( "v_value" ) ) ; cn . jpush . api . push . model . notification . Notification notification = cn . jpush . api . push . model . notification . Notification . newBuilder ( ) . addPlatformNotification ( cn . jpush . api . push . model . notification . AndroidNotification . newBuilder ( ) . setAlert ( "alert" ) . addExtra ( "key" , extraValue ) . build ( ) ) . build ( ) ; com . google . gson . JsonObject json = new com . google . gson . JsonObject ( ) ; com . google . gson . JsonObject android = new com . google . gson . JsonObject ( ) ; android . add ( "alert" , new com . google . gson . JsonPrimitive ( "alert" ) ) ; com . google . gson . JsonObject extra = new com . google . gson . JsonObject ( ) ; extra . add ( "key" , extraValue ) ; android . add ( "extras" , extra ) ; json . add ( "android" , android ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { com . google . gson . JsonObject json = super . toJSON ( ) . getAsJsonObject ( ) ; if ( ! ( badgeDisabled ) ) { if ( null != ( badge ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( this . badge ) ) ; } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_BADGE ) ) ; } } if ( ! ( soundDisabled ) ) { if ( null != ( sound ) ) { if ( ( sound ) instanceof java . lang . String ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( ( ( java . lang . String ) ( sound ) ) ) ) ; } else if ( ( sound ) instanceof com . google . gson . JsonObject ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , ( ( com . google . gson . JsonObject ) ( sound ) ) ) ; } } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_SOUND ) ) ; } } if ( contentAvailable ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CONTENT_AVAILABLE , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( category ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CATEGORY , new com . google . gson . JsonPrimitive ( category ) ) ; } if ( mutableContent ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . MUTABLE_CONTENT , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( threadId ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . THREAD_ID , new com . google . gson . JsonPrimitive ( threadId ) ) ; } return json ; } | org . junit . Assert . assertEquals ( "" , json , notification . toJSON ( ) ) |
testAddModel04 ( ) { org . dresdenocl . model . IModelRegistry modelRegistry ; modelRegistry = org . dresdenocl . modelbus . ModelBusPlugin . getModelRegistry ( ) ; "<AssertPlaceHolder>" ; modelRegistry . addModel ( null ) ; } getModels ( ) { org . dresdenocl . model . IModel [ ] result ; if ( ( this . models ) == null ) { result = new org . dresdenocl . model . IModel [ ] { } ; } else { result = this . models . toArray ( new org . dresdenocl . model . IModel [ this . models . size ( ) ] ) ; } return result ; } | org . junit . Assert . assertEquals ( 0 , modelRegistry . getModels ( ) . length ) |
testInsertBatch ( ) { int beforeInsertCount = countRowsInTable ( "xweb_test" ) ; dao . insertBatch ( com . renren . infra . xweb . repository . TestMybatisDaoTest . testList ) ; int afterInsertCount = countRowsInTable ( "xweb_test" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ( beforeInsertCount + ( com . renren . infra . xweb . repository . TestMybatisDaoTest . testList . size ( ) ) ) , afterInsertCount ) |
testGetWidth_ensureAllRowsAreOfEqualLength ( ) { final int length = StaticGrid . TILE_GRID . getRow ( 0 ) . length ; for ( int y = 0 ; y < ( StaticGrid . TILE_GRID . getHeight ( ) ) ; y ++ ) { final com . valkryst . VTerminal . Tile [ ] row = StaticGrid . TILE_GRID . getRow ( y ) ; "<AssertPlaceHolder>" ; } } getRow ( int ) { if ( ( index >= ( tiles . length ) ) || ( index < 0 ) ) { return com . valkryst . VTerminal . TileGrid . EMPTY_ARRAY ; } return tiles [ index ] ; } | org . junit . Assert . assertEquals ( row . length , length ) |
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 . segments . model . SegmentsEntryRel > segmentsEntryRels = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( segmentsEntryRels . isEmpty ( ) ) |
testCloning ( ) { com . flowpowered . math . vector . VectorNi vector = new com . flowpowered . math . vector . VectorNi ( 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } clone ( ) { return new com . flowpowered . math . vector . Vector4l ( this ) ; } | org . junit . Assert . assertEquals ( vector , vector . clone ( ) ) |
testAcknowledgementOfAcknowledgement ( ) { udt . packets . Acknowledgment2 p1 = new udt . packets . Acknowledgment2 ( ) ; p1 . setAckSequenceNumber ( 1230 ) ; p1 . setMessageNumber ( 9871 ) ; p1 . setTimeStamp ( 3451 ) ; p1 . setDestinationID ( 1 ) ; byte [ ] p1_data = p1 . getEncoded ( ) ; udt . UDTPacket p = udt . packets . PacketFactory . createPacket ( p1_data ) ; udt . packets . Acknowledgment2 p2 = ( ( udt . packets . Acknowledgment2 ) ( p ) ) ; "<AssertPlaceHolder>" ; } createPacket ( byte [ ] ) { boolean isControl = ( ( encodedData [ 0 ] ) & 128 ) != 0 ; if ( isControl ) return udt . packets . PacketFactory . createControlPacket ( encodedData , encodedData . length ) ; return new udt . packets . DataPacket ( encodedData ) ; } | org . junit . Assert . assertEquals ( p1 , p2 ) |
testProjectText_noAppEngineWebXml ( ) { org . eclipse . core . resources . IProject project = mock ( org . eclipse . core . resources . IProject . class ) ; "<AssertPlaceHolder>" ; } getAppEngineProjectText ( org . eclipse . core . resources . IProject ) { try { com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . model . AppEngineProjectElement projectElement = com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . AppEngineContentProvider . loadRepresentation ( project ) ; org . eclipse . jface . viewers . StyledString result = new org . eclipse . jface . viewers . StyledString ( project . getName ( ) ) ; java . lang . String qualifier = com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . AppEngineLabelProvider . getVersionTuple ( projectElement ) ; if ( ( qualifier . length ( ) ) > 0 ) { result . append ( "<sp>[" , StyledString . QUALIFIER_STYLER ) ; result . append ( qualifier . toString ( ) , StyledString . QUALIFIER_STYLER ) ; result . append ( "]" , StyledString . QUALIFIER_STYLER ) ; } return result ; } catch ( com . google . cloud . tools . appengine . AppEngineException ex ) { } return null ; } | org . junit . Assert . assertNull ( com . google . cloud . tools . eclipse . appengine . facets . ui . navigator . AppEngineLabelProvider . getAppEngineProjectText ( project ) ) |
testUncheck ( ) { replay ( view ) ; checkBox . uncheck ( ) ; "<AssertPlaceHolder>" ; } isChecked ( ) { return checked ; } | org . junit . Assert . assertEquals ( false , checkBox . isChecked ( ) ) |
testDetermineOsFamilyForLinux ( ) { final java . lang . String osName = "Linux" ; "<AssertPlaceHolder>" ; } determineOsFamily ( java . lang . String ) { osName = ( osName == null ) ? "" : osName . toLowerCase ( Locale . ENGLISH ) ; if ( osName . contains ( "mac" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . MACOS ; } else if ( osName . contains ( "win" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . WINDOWS ; } else if ( osName . contains ( "nux" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . LINUX ; } else { return com . vmware . xenon . common . SystemHostInfo . OsFamily . OTHER ; } } | org . junit . Assert . assertEquals ( OsFamily . LINUX , com . vmware . xenon . common . SystemHostInfo . determineOsFamily ( osName ) ) |
testGetName ( ) { java . lang . String name = com . gentics . mesh . cli . MeshNameProvider . getInstance ( ) . getRandomName ( ) ; System . out . println ( ( ( "Got<sp>name:<sp>{" + name ) + "}" ) ) ; "<AssertPlaceHolder>" ; } getRandomName ( ) { try { org . codehaus . jettison . json . JSONArray adjArray = adjectives . getJSONArray ( "data" ) ; int randomAdjectiveIndex = ( ( int ) ( ( java . lang . Math . random ( ) ) * ( adjArray . length ( ) ) ) ) ; java . lang . String partA = org . apache . commons . lang3 . StringUtils . trim ( adjArray . getString ( randomAdjectiveIndex ) ) ; java . time . LocalDate now = getDate ( ) ; if ( ( ( now . getDayOfMonth ( ) ) == 1 ) && ( ( now . getMonth ( ) ) == ( java . time . Month . APRIL ) ) ) { return partA + "<sp>Skynet" ; } org . codehaus . jettison . json . JSONArray nameArray = names . getJSONArray ( "data" ) ; int randomNameIndex = ( ( int ) ( ( java . lang . Math . random ( ) ) * ( nameArray . length ( ) ) ) ) ; java . lang . String partB = org . apache . commons . lang3 . StringUtils . trim ( nameArray . getString ( randomNameIndex ) ) ; return ( partA + "<sp>" ) + partB ; } catch ( java . lang . Exception e ) { com . gentics . mesh . cli . MeshNameProvider . log . error ( "Error<sp>while<sp>getting<sp>random<sp>name." , e ) ; return "Unknown" ; } } | org . junit . Assert . assertFalse ( org . apache . commons . lang3 . StringUtils . isEmpty ( name ) ) |
testGetJobNames ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final javax . transaction . Transaction mockTran = mockery . mock ( javax . transaction . Transaction . class ) ; final java . util . Set < java . lang . String > retMe = new java . util . HashSet < java . lang . String > ( ) ; mockery . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockTranMgr ) . suspend ( ) ; will ( returnValue ( mockTran ) ) ; oneOf ( mockJobOperator ) . getJobNames ( ) ; will ( returnValue ( retMe ) ) ; oneOf ( mockTranMgr ) . resume ( mockTran ) ; } } ) ; "<AssertPlaceHolder>" ; } buildJobOperator ( javax . batch . operations . JobOperator , javax . transaction . TransactionManager ) { com . ibm . jbatch . container . api . impl . JobOperatorImplSuspendTran retMe = new com . ibm . jbatch . container . api . impl . JobOperatorImplSuspendTran ( ) ; retMe . setTransactionManager ( mockTranMgr ) ; retMe . setJobOperator ( mockJobOperator ) ; return retMe ; } | org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . getJobNames ( ) ) |
omitsPojoAttributesInWorkersIfAllWorkersReturnNull ( ) { io . datakernel . jmx . JmxMBeansAttributesHidingTest . MBeanStubOne mbean_1 = new io . datakernel . jmx . JmxMBeansAttributesHidingTest . MBeanStubOne ( null ) ; io . datakernel . jmx . JmxMBeansAttributesHidingTest . MBeanStubOne mbean_2 = new io . datakernel . jmx . JmxMBeansAttributesHidingTest . MBeanStubOne ( null ) ; java . util . List < io . datakernel . jmx . JmxMBeansAttributesHidingTest . MBeanStubOne > workersWithNullPojo = asList ( mbean_1 , mbean_2 ) ; javax . management . DynamicMBean mbean = io . datakernel . jmx . JmxMBeans . factory ( ) . createFor ( workersWithNullPojo , io . datakernel . jmx . MBeanSettings . defaultSettings ( ) , false ) ; javax . management . MBeanInfo mbeanInfo = mbean . getMBeanInfo ( ) ; java . util . Map < java . lang . String , javax . management . MBeanAttributeInfo > attrs = nameToAttribute ( mbeanInfo . getAttributes ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 0 , attrs . size ( ) ) |
testAvailCiphersOpenSSL ( ) { org . junit . Assume . assumeTrue ( io . netty . handler . ssl . OpenSsl . isAvailable ( ) ) ; final java . util . Set < java . lang . String > openSSLSecureCiphers = new java . util . HashSet ( ) ; for ( final java . lang . String secure : com . floragunn . searchguard . ssl . util . SSLConfigConstants . getSecureSSLCiphers ( Settings . EMPTY , false ) ) { if ( io . netty . handler . ssl . OpenSsl . isCipherSuiteAvailable ( secure ) ) { openSSLSecureCiphers . add ( secure ) ; } } System . out . println ( ( "OpenSSL<sp>secure<sp>ciphers:<sp>" + openSSLSecureCiphers ) ) ; "<AssertPlaceHolder>" ; } getSecureSSLCiphers ( org . elasticsearch . common . settings . Settings , boolean ) { java . util . List < java . lang . String > configuredCiphers = null ; if ( settings != null ) { if ( http ) { configuredCiphers = settings . getAsList ( com . floragunn . searchguard . ssl . util . SSLConfigConstants . SEARCHGUARD_SSL_HTTP_ENABLED_CIPHERS , java . util . Collections . emptyList ( ) ) ; } else { configuredCiphers = settings . getAsList ( com . floragunn . searchguard . ssl . util . SSLConfigConstants . SEARCHGUARD_SSL_TRANSPORT_ENABLED_CIPHERS , java . util . Collections . emptyList ( ) ) ; } } if ( ( configuredCiphers != null ) && ( ( configuredCiphers . size ( ) ) > 0 ) ) { return configuredCiphers ; } return java . util . Collections . unmodifiableList ( java . util . Arrays . asList ( com . floragunn . searchguard . ssl . util . SSLConfigConstants . _SECURE_SSL_CIPHERS ) ) ; } | org . junit . Assert . assertTrue ( ( ( openSSLSecureCiphers . size ( ) ) > 0 ) ) |
testProxyPipedDispatchPost ( ) { org . apache . cxf . systest . jaxrs . BookStoreSpring localProxy = org . apache . cxf . jaxrs . client . JAXRSClientFactory . create ( "local://books" , org . apache . cxf . systest . jaxrs . BookStoreSpring . class ) ; org . apache . cxf . systest . jaxrs . Book response = localProxy . convertBook ( new org . apache . cxf . systest . jaxrs . Book2 ( "New" , 124L ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( 124L , response . getId ( ) ) |
volleyerShouldReturnVolleyerSameInstanceBySameRequestQueue ( ) { "<AssertPlaceHolder>" ; } volleyer ( com . android . volley . RequestQueue ) { com . navercorp . volleyextensions . volleyer . util . Assert . notNull ( requestQueue , "RequestQueue" ) ; com . navercorp . volleyextensions . volleyer . Volleyer volleyer = com . navercorp . volleyextensions . volleyer . Volleyer . volleyers . get ( requestQueue ) ; if ( volleyer != null ) { return volleyer ; } volleyer = new com . navercorp . volleyextensions . volleyer . Volleyer ( requestQueue ) ; com . navercorp . volleyextensions . volleyer . Volleyer . volleyers . put ( requestQueue , volleyer ) ; return volleyer ; } | org . junit . Assert . assertThat ( volleyer ( requestQueue ) , org . hamcrest . CoreMatchers . is ( volleyer ( requestQueue ) ) ) |
testShouldIgnoreNonUknownProperties ( ) { properties . put ( "another<sp>property" , "some<sp>value<sp>we<sp>don't<sp>care" ) ; bean . setProperties ( properties ) ; "<AssertPlaceHolder>" ; } setProperties ( java . util . Map ) { info . novatec . testit . livingdoc . util . Introspector introspector = new info . novatec . testit . livingdoc . util . Introspector ( target . getClass ( ) , new info . novatec . testit . livingdoc . util . cli . Bean . PropertyComparator ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . Object > property : properties . entrySet ( ) ) { java . lang . reflect . Method setter = introspector . getSetter ( property . getKey ( ) ) ; if ( setter != null ) { invoke ( setter , property . getValue ( ) ) ; } } } | org . junit . Assert . assertTrue ( true ) |
equalsFailTest ( ) { org . threadly . util . Pair < java . lang . String , java . lang . String > p1 = makePair ( org . threadly . util . StringUtils . makeRandomString ( 5 ) , org . threadly . util . StringUtils . makeRandomString ( 5 ) ) ; org . threadly . util . Pair < java . lang . String , java . lang . String > p2 = makePair ( org . threadly . util . StringUtils . makeRandomString ( 5 ) , org . threadly . util . StringUtils . makeRandomString ( 5 ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } else { try { org . threadly . util . debug . ComparableTrace t = ( ( org . threadly . util . debug . ComparableTrace ) ( o ) ) ; if ( ( t . hash ) != ( hash ) ) { return false ; } else { return java . util . Arrays . equals ( t . elements , elements ) ; } } catch ( java . lang . ClassCastException e ) { return false ; } } } | org . junit . Assert . assertFalse ( p1 . equals ( p2 ) ) |
testLocalRepo ( ) { command . local = true ; command . directory = "/tmp/data" ; "<AssertPlaceHolder>" ; verify ( console ) . trace ( contains ( "repo:file:/tmp/data" ) ) ; } buildRepoURI ( ) { if ( ( repoURI ) != null ) { if ( repoURI . startsWith ( "repo:" ) ) { return repoURI ; } else { return "repo:" + ( repoURI ) ; } } java . lang . String uri ; if ( local ) { com . google . common . base . Preconditions . checkArgument ( ( ! ( ( ( hdfs ) || ( hive ) ) || ( hbase ) ) ) , "repo:" 0 ) ; com . google . common . base . Preconditions . checkArgument ( ( ( directory ) != null ) , "--directory<sp>is<sp>required<sp>when<sp>using<sp>local<sp>files" ) ; uri = "repo:file:" + ( directory ) ; } else if ( hdfs ) { com . google . common . base . Preconditions . checkArgument ( ( ! ( ( hive ) || ( hbase ) ) ) , "repo:" 0 ) ; com . google . common . base . Preconditions . checkArgument ( ( ( directory ) != null ) , "--directory<sp>is<sp>required<sp>when<sp>using<sp>HDFS" ) ; uri = "repo:hdfs:" + ( directory ) ; } else if ( hbase ) { com . google . common . base . Preconditions . checkArgument ( ( ! ( hive ) ) , "repo:" 0 ) ; com . google . common . base . Preconditions . checkArgument ( ( ( ( zookeeper ) != null ) && ( ! ( zookeeper . isEmpty ( ) ) ) ) , "repo:" 2 ) ; uri = "repo:hbase:" + ( com . google . common . base . Joiner . on ( "repo:" 1 ) . join ( zookeeper ) ) ; } else { uri = "repo:hive" + ( ( directory ) != null ? ":" + ( directory ) : "" ) ; } console . trace ( ( "Repository<sp>URI:<sp>" + uri ) ) ; return uri ; } | org . junit . Assert . assertEquals ( "repo:file:/tmp/data" , command . buildRepoURI ( ) ) |
testGetSharedConnectionNotShared ( ) { factory . setShareNativeConnection ( false ) ; factory . setHostName ( "fakeHost" ) ; factory . afterPropertiesSet ( ) ; "<AssertPlaceHolder>" ; } getSharedConnection ( ) { if ( shareNativeConnection ) { synchronized ( this . connectionMonitor ) { if ( ( this . connection ) == null ) { initConnection ( ) ; } if ( validateConnection ) { validateConnection ( ) ; } return this . connection ; } } else { return null ; } } | org . junit . Assert . assertNull ( factory . getSharedConnection ( ) ) |
emptyResources ( ) { org . apache . taverna . scufl2 . ucfpackage . UCFPackage resources = wb . getResources ( ) ; "<AssertPlaceHolder>" ; } listResources ( ) { return listResources ( "" , false ) ; } | org . junit . Assert . assertTrue ( resources . listResources ( ) . isEmpty ( ) ) |
test_agentmain_clear ( ) { com . alibaba . dcm . DnsCacheManipulator . setDnsCache ( "baidu.com" , "3.3.3.3" ) ; com . alibaba . dcm . agent . DcmAgent . agentmain ( "<sp>clear<sp>" ) ; "<AssertPlaceHolder>" ; } listDnsCache ( ) { try { return com . alibaba . dcm . internal . InetAddressCacheUtil . listInetAddressCache ( ) . getCache ( ) ; } catch ( java . lang . Exception e ) { throw new com . alibaba . dcm . DnsCacheManipulatorException ( ( "Fail<sp>to<sp>listDnsCache,<sp>cause:<sp>" + ( e . toString ( ) ) ) , e ) ; } } | org . junit . Assert . assertEquals ( 0 , com . alibaba . dcm . DnsCacheManipulator . listDnsCache ( ) . size ( ) ) |
nullElement ( ) { name . pehl . piriti . xml . client . XmlBuilder cut = new name . pehl . piriti . xml . client . XmlBuilder ( null ) ; "<AssertPlaceHolder>" ; } toString ( ) { return new java . lang . StringBuilder ( ) . append ( "TypeContext<sp>[" ) . append ( rwType . getParameterizedQualifiedSourceName ( ) ) . append ( "<sp>for<sp>" ) . append ( type . getParameterizedQualifiedSourceName ( ) ) . append ( "]" ) . toString ( ) ; } | org . junit . Assert . assertEquals ( "" , cut . toString ( ) ) |
testIsNewColumnWhenColumnIsNotNull ( ) { final org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . BaseDecisionTableColumnPlugin plugin = makeBasePlugin ( ) ; plugin . setOriginalColumnConfig52 ( mock ( org . drools . workbench . models . guided . dtable . shared . model . DTColumnConfig52 . class ) ) ; "<AssertPlaceHolder>" ; } isNewColumn ( ) { return ! ( java . util . Optional . ofNullable ( originalColumnConfig52 ) . isPresent ( ) ) ; } | org . junit . Assert . assertFalse ( plugin . isNewColumn ( ) ) |
testRebuild1 ( ) { final net . sourceforge . pmd . eclipse . runtime . properties . IProjectPropertiesManager mgr = net . sourceforge . pmd . eclipse . plugin . PMDPlugin . getDefault ( ) . getPropertiesManager ( ) ; final net . sourceforge . pmd . eclipse . runtime . properties . IProjectProperties model = mgr . loadProjectProperties ( this . testProject ) ; model . setPmdEnabled ( false ) ; model . setProjectWorkingSet ( null ) ; model . setRuleSetStoredInProject ( false ) ; model . setNeedRebuild ( false ) ; "<AssertPlaceHolder>" ; } isNeedRebuild ( ) { net . sourceforge . pmd . eclipse . runtime . properties . impl . ProjectPropertiesImpl . LOG . debug ( ( ( ( "Query<sp>if<sp>project<sp>" + ( project . getName ( ) ) ) + "<sp>need<sp>rebuild<sp>:<sp>" ) + ( ( pmdEnabled ) && ( needRebuild ) ) ) ) ; net . sourceforge . pmd . eclipse . runtime . properties . impl . ProjectPropertiesImpl . LOG . debug ( ( "<sp>PMD<sp>Enabled<sp>=<sp>" + ( pmdEnabled ) ) ) ; net . sourceforge . pmd . eclipse . runtime . properties . impl . ProjectPropertiesImpl . LOG . debug ( ( "<sp>Project<sp>need<sp>rebuild<sp>=<sp>" + ( needRebuild ) ) ) ; if ( ruleSetStoredInProject ) { for ( java . io . File f : getResolvedRuleSetFiles ( ) ) { if ( f != null ) { needRebuild |= ( f . lastModified ( ) ) > ( projectRuleFileLastModified ) ; } } } return ( pmdEnabled ) && ( needRebuild ) ; } | org . junit . Assert . assertFalse ( model . isNeedRebuild ( ) ) |
primitiveDeserializeBoolean ( ) { com . google . firebase . database . MapperTest . BooleanBean beanBoolean = com . google . firebase . database . MapperTest . deserialize ( "{'value':<sp>true}" , com . google . firebase . database . MapperTest . BooleanBean . class ) ; "<AssertPlaceHolder>" ; try { com . google . firebase . database . MapperTest . deserialize ( "{'value':<sp>1.1}" , com . google . firebase . database . MapperTest . BooleanBean . class ) ; org . junit . Assert . fail ( "Should<sp>throw" ) ; } catch ( com . google . firebase . database . DatabaseException e ) { } try { com . google . firebase . database . MapperTest . deserialize ( "{'value':<sp>1234567890123}" , com . google . firebase . database . MapperTest . BooleanBean . class ) ; org . junit . Assert . fail ( "Should<sp>throw" ) ; } catch ( com . google . firebase . database . DatabaseException e ) { } try { com . google . firebase . database . MapperTest . deserialize ( "{'value':<sp>1}" , com . google . firebase . database . MapperTest . BooleanBean . class ) ; org . junit . Assert . fail ( "Should<sp>throw" ) ; } catch ( com . google . firebase . database . DatabaseException e ) { } try { com . google . firebase . database . MapperTest . deserialize ( "{'value':<sp>'foo'}" , com . google . firebase . database . MapperTest . BooleanBean . class ) ; org . junit . Assert . fail ( "Should<sp>throw" ) ; } catch ( com . google . firebase . database . DatabaseException e ) { } } deserialize ( java . lang . String , java . lang . Class ) { java . util . Map < java . lang . String , java . lang . Object > json = com . google . firebase . database . TestHelpers . fromSingleQuotedString ( jsonString ) ; return com . google . firebase . database . utilities . encoding . CustomClassMapper . convertToCustomClass ( json , clazz ) ; } | org . junit . Assert . assertEquals ( true , beanBoolean . value ) |
source_uri_force_lang ( ) { org . apache . jena . graph . Graph graph = org . apache . jena . sparql . graph . GraphFactory . createGraphMem ( ) ; org . apache . jena . riot . RDFParser . create ( ) . source ( ( ( "file:" + ( org . apache . jena . riot . TestRDFParser . DIR ) ) + "data.rdf" ) ) . forceLang ( Lang . TTL ) . parse ( graph ) ; "<AssertPlaceHolder>" ; } size ( ) { return pmap . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , graph . size ( ) ) |
test ( ) { java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 1 , 2 , 3 , 4 , 5 } ) ; bb . limit ( 3 ) ; byte [ ] a = bb . array ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 6 , a . length ) |
testWrongServerChallenge ( ) { final javax . security . sasl . SaslClientFactory factory = obtainSaslClientFactory ( org . wildfly . security . sasl . external . ExternalSaslClientFactory . class ) ; final javax . security . sasl . SaslClient saslClient = factory . createSaslClient ( org . wildfly . security . sasl . external . ExternalSaslClientTest . MECHANISMS_EXTERNAL_ONLY , org . wildfly . security . sasl . external . ExternalSaslClientTest . ADMIN , "test" , "localhost" , setProps ( ) , null ) ; "<AssertPlaceHolder>" ; saslClient . evaluateChallenge ( "test" . getBytes ( StandardCharsets . UTF_8 ) ) ; } isComplete ( ) { return delegate . isComplete ( ) ; } | org . junit . Assert . assertFalse ( saslClient . isComplete ( ) ) |
deleteIndexByKey ( ) { final java . util . Collection < java . lang . String > fields = new java . util . ArrayList < java . lang . String > ( ) ; fields . add ( "a" ) ; final com . arangodb . entity . IndexEntity createResult = db . collection ( com . arangodb . ArangoCollectionTest . COLLECTION_NAME ) . ensureHashIndex ( fields , null ) ; final java . lang . String id = db . collection ( com . arangodb . ArangoCollectionTest . COLLECTION_NAME ) . deleteIndex ( createResult . getId ( ) . split ( "/" ) [ 1 ] ) ; "<AssertPlaceHolder>" ; try { db . getIndex ( id ) ; org . junit . Assert . fail ( ) ; } catch ( final com . arangodb . ArangoDBException e ) { } } getId ( ) { return id ; } | org . junit . Assert . assertThat ( id , org . hamcrest . Matchers . is ( createResult . getId ( ) ) ) |
testLinkQueryByNameNotFound ( ) { addPageRequest ( "http://test.com" , newHtml ( "Test<sp>Page" , "<a<sp>id=\"foo\"<sp>href=\"foo.html\">foo</a>" ) ) ; com . gistlabs . mechanize . document . AbstractDocument page = agent ( ) . get ( "http://test.com" ) ; com . gistlabs . mechanize . document . link . Link link = page . links ( ) . find ( byName ( "foo" ) ) ; "<AssertPlaceHolder>" ; } byName ( java . lang . String ) { return java . lang . String . format ( "*[name=\"%s\"]" , s ) ; } | org . junit . Assert . assertNull ( link ) |
scriptWithParamsConstructor ( ) { System . out . println ( "<sp>Jiffle(script,<sp>imageParams)" ) ; java . lang . String script = "dest<sp>=<sp>42;" ; imageParams . put ( "dest" , Jiffle . ImageRole . DEST ) ; jiffle = new it . geosolutions . jaiext . jiffle . Jiffle ( script , imageParams ) ; "<AssertPlaceHolder>" ; } isCompiled ( ) { return true ; } | org . junit . Assert . assertTrue ( jiffle . isCompiled ( ) ) |
decodeLongIntoObject ( ) { stubValueMeta . setType ( 5 ) ; java . lang . Object str = stubValueMeta . decodeColumnValue ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 1L ) ) ; "<AssertPlaceHolder>" ; } toBytes ( double ) { return hBaseBytesUtilShim . toBytes ( var1 ) ; } | org . junit . Assert . assertNotNull ( str ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.